summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/buff-imp-mp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-02-06 20:42:35 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-02-06 20:42:35 +0100
commit1687077b0a63417ad4dce58f6c869a6e115d9b72 (patch)
treeec1d4ac5ea55b732c13c12c0c0e67739afa93ef8 /tex/context/base/mkiv/buff-imp-mp.lua
parent7ce2f30f31421eb46d07ff65cbf9fcbda1d6612a (diff)
downloadcontext-1687077b0a63417ad4dce58f6c869a6e115d9b72.tar.gz
2018-02-06 18:19:00
Diffstat (limited to 'tex/context/base/mkiv/buff-imp-mp.lua')
-rw-r--r--tex/context/base/mkiv/buff-imp-mp.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/buff-imp-mp.lua b/tex/context/base/mkiv/buff-imp-mp.lua
index bcd18dd47..daf8187ae 100644
--- a/tex/context/base/mkiv/buff-imp-mp.lua
+++ b/tex/context/base/mkiv/buff-imp-mp.lua
@@ -36,6 +36,7 @@ local MetapostSnippetConstructor = verbatim.MetapostSnippetConstructor
local MetapostSnippetBoundary = verbatim.MetapostSnippetBoundary
local MetapostSnippetSpecial = verbatim.MetapostSnippetSpecial
local MetapostSnippetComment = verbatim.MetapostSnippetComment
+local MetapostSnippetCommentText = verbatim.MetapostSnippetCommentText
local MetapostSnippetQuote = verbatim.MetapostSnippetQuote
local MetapostSnippetString = verbatim.MetapostSnippetString
local MetapostSnippetNamePrimitive = verbatim.MetapostSnippetNamePrimitive
@@ -80,12 +81,13 @@ local handler = visualizers.newhandler {
boundary = function(s) MetapostSnippetBoundary(s) end,
special = function(s) MetapostSnippetSpecial(s) end,
comment = function(s) MetapostSnippetComment(s) end,
+ commenttext = function(s) MetapostSnippetCommentText(s) end,
string = function(s) MetapostSnippetString(s) end,
quote = function(s) MetapostSnippetQuote(s) end,
name = visualizename,
}
-local comment = S("%")
+local comment = P("%")
local name = (patterns.letter + S("_"))^1
local constructor = S("$@#")
local boundary = S('()[]:=<>;"')
@@ -94,7 +96,7 @@ local special = S("-+/*|`!?^&%.,")
local grammar = visualizers.newgrammar("default", { "visualizer",
comment = makepattern(handler,"comment",comment)
- * (V("space") + V("content"))^0,
+ * makepattern(handler,"commenttext",(patterns.anything - patterns.newline)^0),
dstring = makepattern(handler,"quote",patterns.dquote)
* makepattern(handler,"string",patterns.nodquote)
* makepattern(handler,"quote",patterns.dquote),