From 92e8189f0833024f4ad53c013fc7bd568a9c3bf0 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 9 Sep 2010 11:57:09 +0200 Subject: proper file IO; cleaned up debug helper --- rst_context.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'rst_context.lua') 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 -- cgit v1.2.3