Hans, the attached patch comes from code that Christoph Reller kindly provided me with to fix comments in TeX, MP and Lua (https://bitbucket.org/philexander/context-highlight/issues/2/highlight-for-t...). * It formats the whole comment (both character and text [not only the former]) for TeX and MP. * It does the same for one-line comments in Lua. * It fixes multiline comments in Lua. * It fixes a minor typo. The following code is compiled in the PDF attachment that shows the difference before and after the patch: \starttext \startTEX % comment for the whole line \stopTEX \startMP a % comment for the rest of the line \stopMP \startLUA --[[ multiline comment --]] ---[[ multiline but not comment ---]] \stopLUA \stoptext Could you consider merging in ConTeXt? Many thanks for your help, Pablo -- http://www.ousia.tk
On 1/31/2018 7:14 PM, Pablo Rodriguez wrote:
Hans,
the attached patch comes from code that Christoph Reller kindly provided me with to fix comments in TeX, MP and Lua (https://bitbucket.org/philexander/context-highlight/issues/2/highlight-for-t...).
* It formats the whole comment (both character and text [not only the former]) for TeX and MP.
* It does the same for one-line comments in Lua.
* It fixes multiline comments in Lua.
* It fixes a minor typo.
The following code is compiled in the PDF attachment that shows the difference before and after the patch:
\starttext \startTEX % comment for the whole line \stopTEX
\startMP a % comment for the rest of the line \stopMP
\startLUA --[[
multiline
comment --]]
---[[
multiline
but not comment ---]] \stopLUA \stoptext
Could you consider merging in ConTeXt?
I'll make this: \definestartstop [LuaSnippetCommentText] [color=darkyellow] \definestartstop [TeXSnippetCommentText] [color=darkyellow] \definestartstop [MetapostSnippetCommentText] [color=darkyellow] (not bold by default) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 02/06/2018 05:49 PM, Hans Hagen wrote:
On 1/31/2018 7:14 PM, Pablo Rodriguez wrote:
Hans,
the attached patch comes from code that Christoph Reller kindly provided me with to fix comments in TeX, MP and Lua (https://bitbucket.org/philexander/context-highlight/issues/2/highlight-for-t...).
* It formats the whole comment (both character and text [not only the former]) for TeX and MP.
Could you consider merging in ConTeXt?
I'll make this:
\definestartstop [LuaSnippetCommentText] [color=darkyellow] \definestartstop [TexSnippetCommentText] [color=darkyellow] \definestartstop [MetapostSnippetCommentText] [color=darkyellow]
(not bold by default)
Hans, many thanks for your implementation. Pablo -- http://www.ousia.tk
participants (2)
-
Hans Hagen
-
Pablo Rodriguez