summaryrefslogtreecommitdiff
path: root/mod/tex/context/third/rst
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2013-06-03 19:03:28 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2013-06-03 19:03:28 +0200
commitd6fdc881c4460729e848435eccf17cf38e6f29eb (patch)
tree792ef2a465a8564a4b204bf7ea65de53432eb80b /mod/tex/context/third/rst
parent624597b9a1dcc821a2d6b2ad000f134f75f5ef96 (diff)
downloadcontext-rst-d6fdc881c4460729e848435eccf17cf38e6f29eb.tar.gz
fix local copies of the state table
Diffstat (limited to 'mod/tex/context/third/rst')
-rw-r--r--mod/tex/context/third/rst/rst_context.lua10
-rw-r--r--mod/tex/context/third/rst/rst_setups.lua3
2 files changed, 6 insertions, 7 deletions
diff --git a/mod/tex/context/third/rst/rst_context.lua b/mod/tex/context/third/rst/rst_context.lua
index 7d0f2b8..69c0da1 100644
--- a/mod/tex/context/third/rst/rst_context.lua
+++ b/mod/tex/context/third/rst/rst_context.lua
@@ -77,13 +77,13 @@ rst_context.current_footnote_number = 0
rst_context.current_symbolnote_number = 0
function rst_context.addsetups(item)
- local state = thirddata.rst.state
+ local state = rst_context.state
state.addme[item] = state.addme[item] or true
return 0
end
function rst_context.footnote_reference (label)
- local tf = thirddata.rst.state.footnotes
+ local tf = rst_context.state.footnotes
if stringmatch(label, "^%d+$") then -- all digits
local c = tonumber(label)
return [[\\footnote{\\getbuffer[__footnote_number_]].. c .."]}"
@@ -501,8 +501,8 @@ local inline_parser = P{
lparenthesis = P"(",
rparenthesis = P")",
- lsquare = P"[" / [[{\\letterleftbracket}]],
- rsquare = P"]" / [[{\\letterrightbracket}]],
+ lsquare = P"[" / [[{\\string[}]],
+ rsquare = P"]" / [[{\\string]}]],
lbrace = P"{" / [[{\\letterleftbrace}]],
rbrace = P"}" / [[{\\letterrightbrace}]],
less = P"<",
@@ -1239,7 +1239,7 @@ function rst_context.simple_table(tab)
end
function rst_context.footnote (label, content)
- local tf = thirddata.rst.state.footnotes
+ local tf = rst_context.state.footnotes
rst_context.addsetups("footnotes")
if stringmatch(label, "^%d+$") then -- all digits
tf.numbered[tonumber(label)] =
diff --git a/mod/tex/context/third/rst/rst_setups.lua b/mod/tex/context/third/rst/rst_setups.lua
index 7dd8161..21f0fe9 100644
--- a/mod/tex/context/third/rst/rst_setups.lua
+++ b/mod/tex/context/third/rst/rst_setups.lua
@@ -12,7 +12,6 @@ local optional_setups = { }
thirddata.rst_setups = optional_setups
local rst_directives = thirddata.rst_directives
local rst_context = thirddata.rst
-local state = rst_context.state
local stringformat = string.format
local stringstrip = string.strip
@@ -29,7 +28,7 @@ function optional_setups.footnote_symbol ()
end
function optional_setups.footnotes ()
- local tf = state.footnotes
+ local tf = rst_context.state.footnotes
local fn = [[
%---------------------------------------------------------------%