mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 17:18:17 +02:00
SynEdit: enable matching node markup for html and xml. Issue #0023016
git-svn-id: trunk@50780 -
This commit is contained in:
parent
fa40a95924
commit
bfc71c54f9
@ -2523,18 +2523,21 @@ begin
|
||||
end;
|
||||
|
||||
procedure TSynHTMLSyn.IdentProc;
|
||||
var
|
||||
R: LongInt;
|
||||
begin
|
||||
case fRange of
|
||||
rsKey:
|
||||
begin
|
||||
fRange := rsParam;
|
||||
fTokenID := IdentKind((fLine + Run));
|
||||
if ((FMode = shmXHtml) or (not fSimpleTag)) then
|
||||
if fLine[Run] = '/' then
|
||||
EndHtmlNodeCodeFoldBlock(Run+1, copy(fline, Run+2, fStringLen-1))
|
||||
else if fLine[Run] <> '!' then
|
||||
StartHtmlNodeCodeFoldBlock(cfbtHtmlNode, Run, copy(fline, Run+1, fStringLen));
|
||||
R := Run;
|
||||
Inc(Run, fStringLen);
|
||||
if ((FMode = shmXHtml) or (not fSimpleTag)) then
|
||||
if fLine[R] = '/' then
|
||||
EndHtmlNodeCodeFoldBlock(R+1, copy(fline, R+2, fStringLen-1))
|
||||
else if fLine[R] <> '!' then
|
||||
StartHtmlNodeCodeFoldBlock(cfbtHtmlNode, R, copy(fline, R+1, fStringLen));
|
||||
end;
|
||||
rsValue:
|
||||
begin
|
||||
@ -2759,6 +2762,10 @@ function TSynHTMLSyn.GetFoldConfigInstance(Index: Integer): TSynCustomFoldConfig
|
||||
begin
|
||||
Result := inherited GetFoldConfigInstance(Index);
|
||||
Result.Enabled := True;
|
||||
if THtmlCodeFoldBlockType(Index) in [cfbtHtmlNode] then begin
|
||||
Result.SupportedModes := Result.SupportedModes + [fmMarkup];
|
||||
Result.Modes := Result.Modes + [fmMarkup];
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSynHTMLSyn.StartHtmlCodeFoldBlock(ABlockType: THtmlCodeFoldBlockType): TSynCustomCodeFoldBlock;
|
||||
|
@ -747,6 +747,10 @@ function TSynXMLSyn.GetFoldConfigInstance(Index: Integer): TSynCustomFoldConfig;
|
||||
begin
|
||||
Result := inherited GetFoldConfigInstance(Index);
|
||||
Result.Enabled := True;
|
||||
if TXmlCodeFoldBlockType(Index) in [cfbtXmlNode] then begin
|
||||
Result.SupportedModes := Result.SupportedModes + [fmMarkup];
|
||||
Result.Modes := Result.Modes + [fmMarkup];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSynXMLSyn.IdentProc;
|
||||
|
Loading…
Reference in New Issue
Block a user