Skip to content

Commit c29bd68

Browse files
committed
Fix format error in REML code generator
Code in UREMLDataIO unit that pretty-printed REML from active text was malforming some lines where (a) text followed a closing block tag and (b) an inline tag immediately followed an opening block tag.
1 parent b834851 commit c29bd68

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Src/UREMLDataIO.pas

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ function TREMLWriter.RenderTag(
598598
begin
599599
Dec(fLevel);
600600
Result := EOL + StrOfSpaces(IndentMult * fLevel) + Result + EOL;
601+
fIsStartOfTextLine := True;
601602
end;
602603
end;
603604
fsOpen:
@@ -620,6 +621,14 @@ function TREMLWriter.RenderTag(
620621
Result := EOL + StrOfSpaces(IndentMult * fLevel) + Result + EOL;
621622
Inc(fLevel);
622623
fIsStartOfTextLine := True;
624+
end
625+
else if TActiveTextElemCaps.DisplayStyleOf(TagElem.Kind) = dsInline then
626+
begin
627+
if fIsStartOfTextLine then
628+
begin
629+
Result := StrOfSpaces(IndentMult * fLevel) + Result;
630+
fIsStartOfTextLine := False;
631+
end;
623632
end;
624633
end;
625634
end;

0 commit comments

Comments
 (0)