summaryrefslogtreecommitdiff
path: root/context/data/textadept/context/lexers/scite-context-lexer-mps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'context/data/textadept/context/lexers/scite-context-lexer-mps.lua')
-rw-r--r--context/data/textadept/context/lexers/scite-context-lexer-mps.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/context/data/textadept/context/lexers/scite-context-lexer-mps.lua b/context/data/textadept/context/lexers/scite-context-lexer-mps.lua
index 1c87ea6d0..4bbfae03c 100644
--- a/context/data/textadept/context/lexers/scite-context-lexer-mps.lua
+++ b/context/data/textadept/context/lexers/scite-context-lexer-mps.lua
@@ -91,9 +91,12 @@ local plain = token("plain", exact_match(metapostcommands))
local quoted = token("quote", dquote)
* token("string", P(1-dquote)^0)
* token("quote", dquote)
-local texstuff = token("quote", P("btex ") + P("verbatimtex "))
- * token("string", P(1-P(" etex"))^0)
- * token("quote", P(" etex"))
+local separator = P(" ") + S("\n\r")^1
+local btex = (P("btex") + P("verbatimtex")) * separator
+local etex = separator * P("etex")
+local texstuff = token("quote", btex)
+ * token("string", (1-etex)^0)
+ * token("quote", etex)
local primitive = token("primitive", exact_match(metapostprimitives))
local identifier = token("default", cstoken^1)
local number = token("number", number)
@@ -130,10 +133,10 @@ metafunlexer._rules = {
{ "comment", comment },
{ "internal", internal },
{ "shortcut", shortcut },
+ { "luacall", luacall },
{ "helper", helper },
{ "plain", plain },
{ "primitive", primitive },
- { "luacall", luacall },
{ "texstuff", texstuff },
{ "suffix", suffix },
{ "identifier", identifier },