summaryrefslogtreecommitdiff
path: root/mod/tex/context/third/rst/rst_parser.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <gesang@stud.uni-heidelberg.de>2013-03-12 17:05:16 +0100
committerPhilipp Gesang <gesang@stud.uni-heidelberg.de>2013-03-12 17:05:16 +0100
commit09dd07bcc2397ff03460d5e89f8125456c29e025 (patch)
treed65828105981aa94bfaa697358d09a799834609a /mod/tex/context/third/rst/rst_parser.lua
parent9c6a8a9737e6f5b09ca65ed82a186b58e731e350 (diff)
downloadcontext-rst-09dd07bcc2397ff03460d5e89f8125456c29e025.tar.gz
fix spurious global; workaround buffer idiosyncrasy in manual
Diffstat (limited to 'mod/tex/context/third/rst/rst_parser.lua')
-rw-r--r--mod/tex/context/third/rst/rst_parser.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/mod/tex/context/third/rst/rst_parser.lua b/mod/tex/context/third/rst/rst_parser.lua
index 4e6db41..d0d8de9 100644
--- a/mod/tex/context/third/rst/rst_parser.lua
+++ b/mod/tex/context/third/rst/rst_parser.lua
@@ -70,7 +70,9 @@ local P, R, S, V, match
local utf = unicode.utf8
-state = {}
+local state = {}
+thirddata.rst.state = state
+
state.depth = 0
state.bullets = {} -- mapping bullet forms to depth
state.bullets.max = 0
@@ -1484,7 +1486,7 @@ end
do
local Cs, P = lpeg.Cs, lpeg.P
- local percent = P"\%"
+ local percent = P"%"
local eol = P"\n"
local comment = percent * (1 - eol)^0 * eol / "\n"
strip_comments = Cs((comment + 1)^0)
@@ -1535,7 +1537,7 @@ function thirddata.rst.get_rst_inclusion (iname)
if rst_inclusions[iname] then
context.input(rst_inclusions[iname])
else
- context(stringformat("{\\bf File for inclusion ā€œ%sā€ not found.}\par ", iname))
+ context(stringformat([[{\bf File for inclusion ā€œ%sā€ not found.}\par ]], iname))
end
end