From db8c89da93721f942c4e6b3f0e4769bd5e992189 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 22 Oct 2015 01:59:52 +0200 Subject: [PATCH] note about HL scanner using char(10) to get eol --- src/ce_d2syn.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ce_d2syn.pas b/src/ce_d2syn.pas index 129f5e16..dda7128d 100644 --- a/src/ce_d2syn.pas +++ b/src/ce_d2syn.pas @@ -464,6 +464,10 @@ end; procedure TSynD2Syn.setLine(const NewValue: String; LineNumber: Integer); begin inherited; + // note: the end of line is marked with a #10 + // usually a TSynCustomFoldHighlighter rather tests 'length(line)' in 'Next()' + // but since the scanner works line by line, #10 is guaranteed not to + // appear at all excepted when added implictly, like here. fLineBuf := NewValue + #10; fTokStop := 1; next;