mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 15:25:07 +02:00
IDE: codehelp: removing pasdoc
git-svn-id: trunk@16844 -
This commit is contained in:
parent
626815db77
commit
36f21372de
@ -61,7 +61,8 @@ function CleanCodeFromComments(const DirtyCode: string;
|
|||||||
NestedComments: boolean): string;
|
NestedComments: boolean): string;
|
||||||
function ExtractCommentContent(const ASource: string; CommentStart: integer;
|
function ExtractCommentContent(const ASource: string; CommentStart: integer;
|
||||||
NestedComments: boolean;
|
NestedComments: boolean;
|
||||||
TrimStart: boolean = false; TrimEnd: boolean = false): string;
|
TrimStart: boolean = false; TrimEnd: boolean = false;
|
||||||
|
TrimPasDoc: boolean = false): string;
|
||||||
function FindMainUnitHint(const ASource: string; out Filename: string): boolean;
|
function FindMainUnitHint(const ASource: string; out Filename: string): boolean;
|
||||||
|
|
||||||
// indent
|
// indent
|
||||||
@ -2787,7 +2788,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function ExtractCommentContent(const ASource: string; CommentStart: integer;
|
function ExtractCommentContent(const ASource: string; CommentStart: integer;
|
||||||
NestedComments: boolean; TrimStart: boolean; TrimEnd: boolean): string;
|
NestedComments: boolean; TrimStart: boolean; TrimEnd: boolean;
|
||||||
|
TrimPasDoc: boolean): string;
|
||||||
var
|
var
|
||||||
CommentEnd: LongInt;
|
CommentEnd: LongInt;
|
||||||
StartPos: LongInt;
|
StartPos: LongInt;
|
||||||
@ -2820,6 +2822,10 @@ begin
|
|||||||
dec(EndPos);
|
dec(EndPos);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if TrimPasDoc then begin
|
||||||
|
if (StartPos<EndPos) and (ASource[StartPos]='<') then
|
||||||
|
inc(StartPos);
|
||||||
|
end;
|
||||||
if TrimStart then begin
|
if TrimStart then begin
|
||||||
while (StartPos<EndPos) and (ASource[StartPos] in [' ',#9,#10,#13]) do
|
while (StartPos<EndPos) and (ASource[StartPos] in [' ',#9,#10,#13]) do
|
||||||
inc(StartPos);
|
inc(StartPos);
|
||||||
|
@ -1847,7 +1847,7 @@ begin
|
|||||||
then
|
then
|
||||||
continue;
|
continue;
|
||||||
CommentStr:=ExtractCommentContent(CommentCode.Source,CommentStart,
|
CommentStr:=ExtractCommentContent(CommentCode.Source,CommentStart,
|
||||||
NestedComments,true,true);
|
NestedComments,true,true,true);
|
||||||
if CommentStr<>'' then begin
|
if CommentStr<>'' then begin
|
||||||
if not ItemAdded then begin
|
if not ItemAdded then begin
|
||||||
AddText(Item.ElementName+LineEnding
|
AddText(Item.ElementName+LineEnding
|
||||||
|
Loading…
Reference in New Issue
Block a user