diff options
Diffstat (limited to 'context/data/scite/lexers/scite-context-lexer.lua')
-rw-r--r-- | context/data/scite/lexers/scite-context-lexer.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/context/data/scite/lexers/scite-context-lexer.lua b/context/data/scite/lexers/scite-context-lexer.lua index fa627a836..27d7bd37e 100644 --- a/context/data/scite/lexers/scite-context-lexer.lua +++ b/context/data/scite/lexers/scite-context-lexer.lua @@ -182,6 +182,12 @@ patterns.spacing = space^1 patterns.nospacing = (1-space)^1 patterns.anything = P(1) +local endof = S("\n\r\f") + +patterns.startofline = P(function(input,index) + return (index == 1 or lpegmatch(endof,input,index-1)) and index +end) + function context.exact_match(words,word_chars,case_insensitive) local characters = concat(words) local pattern -- the concat catches _ etc |