issue in Lua syntax formatting
Hi, the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[": \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext (Denis recognized that in his MAPS/CGJ article on ligature handling.) Hraban
the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[":
\starttext
\startLUA words = [[ one two three ]] \stopLUA
\stoptext
I can reproduce this. As a workaround, you can insert a non-breaking space (U+00A0) immediately after the "[[": \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext (You can't see the NBSP, but it's there) You can also use the Scite syntax highlighting: \usemodule[scite] \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext It produces different (but usually better) output than the default highlighter. This module is installed by default with ConTeXt LMTX. There's also the Vim module: \usemodule[vim] \definevimtyping[LUA][syntax=lua] \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext You would need to install this module manually though. -- Max
Am 01.06.22 um 02:39 schrieb Max Chernoff:
the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[":
I can reproduce this. As a workaround, you can insert a non-breaking space (U+00A0) immediately after the "[[":
Good idea, but I’d like to avoid invisible tweaks.
You can also use the Scite syntax highlighting:
\usemodule[scite]
Thank you for the reminder! Since I need it for the CG journal, I wanted to avoid additional dependencies, but the scite module is part of the distribution anyway and works as a drop-in replacement. Hraban
participants (2)
-
Henning Hraban Ramm
-
Max Chernoff