summaryrefslogtreecommitdiff
path: root/rst_context.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-09 11:57:09 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-09 11:57:09 +0200
commit92e8189f0833024f4ad53c013fc7bd568a9c3bf0 (patch)
tree9cb44a8b031f3d2af925de8976edb688d125fc16 /rst_context.lua
parentd0253ecefdd3acac717e6215d46b17977ac28319 (diff)
downloadcontext-rst-92e8189f0833024f4ad53c013fc7bd568a9c3bf0.tar.gz
proper file IO; cleaned up debug helper
Diffstat (limited to 'rst_context.lua')
-rw-r--r--rst_context.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/rst_context.lua b/rst_context.lua
index 033c252..64c2cd6 100644
--- a/rst_context.lua
+++ b/rst_context.lua
@@ -13,7 +13,9 @@
require "lpeg"
-require "rst_helpers"
+require help = "rst_helpers"
+
+local dbg_write = help.dbg_write
local C, Cb, Cc, Cg, Cmt, Cp, Cs, Ct, P, R, S, V, match = lpeg.C, lpeg.Cb, lpeg.Cc, lpeg.Cg, lpeg.Cmt, lpeg.Cp, lpeg.Cs, lpeg.Ct, lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
@@ -281,7 +283,7 @@ local inline_parser = P{
function rst_context.paragraph (tab)
local str = inline_parser:match(table.concat(tab, " "))
- print(inline_parser:match(table.concat(tab, " ")))
+ --print(inline_parser:match(table.concat(tab, " ")))
return string.format([[
\\startparagraph
@@ -405,7 +407,7 @@ function rst_context.startitemize(str)
local listtype = enumeration_types[str] or parse_itemstring(str)
if type(listtype) == "table" then
- print(type(listtype), listtype[2])
+ --print(type(listtype), listtype[2])
setup = listtype.setup
listtype = listtype.str
end
@@ -424,7 +426,7 @@ end
function rst_context.bullet_item (str)
return [[
-\\item ]] .. str .. [[
+\\item ]] .. inline_parser:match(str) .. [[
]]
end
@@ -684,7 +686,6 @@ function rst_context.table_row (tab)
local tmp = [[\\bTR]]
for n, cell in ipairs(tab) do
tmp = tmp .. [[\\bTC]] .. cell .. [[\\eTC]] .. "\n"
- print (cell)
end
tmp = tmp .. [[\\eTR