ddoc comments, ignore a line that starts with 'ditto'

and optionally a period.
This commit is contained in:
Basile Burg 2015-08-12 13:12:19 +02:00
parent 5004840dde
commit 20ef73bb57
1 changed files with 7 additions and 2 deletions

View File

@ -337,6 +337,7 @@ end;
procedure TCEDcdWrapper.getDdocFromCursor(out aComment: string);
var
i: Integer;
str: string;
begin
if not fAvailable then exit;
if not fServerListening then exit;
@ -361,8 +362,12 @@ begin
fTempLines.LoadFromStream(fClient.Output);
if fTempLines.Count = 0 then
updateServerlistening;
for i := 0 to fTempLines.Count-1 do
aComment += ReplaceStr(fTempLines.Strings[i], '\n', LineEnding);
for str in fTempLines do
begin
if (length(str) < 9) and AnsiSameText(str[1..5], 'DITTO') then
continue;
aComment += ReplaceStr(str, '\n', LineEnding);
end;
end;
procedure TCEDcdWrapper.getDeclFromCursor(out aFilename: string; out aPosition: Integer);