From 31bd1dd91c8d803a6c45ef9192b4ba11c7224501 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 20 Sep 2010 15:01:10 +0200 Subject: removed enforced spacing preceding inline literals --- rst_context.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'rst_context.lua') diff --git a/rst_context.lua b/rst_context.lua index 34f4594..12c6817 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -118,6 +118,7 @@ function rst_context.strong_emphasis (str) end function rst_context.literal (str) + print(str) str = str:gsub([[\]], [[\\]]) -- evade escaping of backslashes return [[\\type{]] .. str .. [[}]] --return [[\\starttyping ]] .. str .. [[\\stoptyping]] @@ -270,6 +271,7 @@ local inline_parser = P{ + P"โ€ž", -- not in standard Murkin reST succede_inline = V"spacing" + + V"eol" + S[['")]}>-/:.,;!?\]] + P"โ€™" + P"โ€" + P"ยป" + V"inline_delimiter" @@ -468,11 +470,18 @@ function rst_context.paragraph (data) local str if not data then return "" + --elseif type(data) == "table" then + --str = #data > 1 and helpers.string.wrapat(inline_parser:match(table.concat(data, " ")), 65) or data[1] elseif type(data) == "table" then - str = #data > 1 and helpers.string.wrapat(inline_parser:match(table.concat(data, " ")), 65) or data[1] + str = table.concat(data, " ") + str = inline_parser:match(str) + str = helpers.string.wrapat(str) + print(str) + --str = #data > 1 and helpers.string.wrapat(inline_parser:match(table.concat(data, " ")), 65) or data[1] else str = data end + --print(str) return string.format([[ \\startparagraph @@ -1587,7 +1596,7 @@ function optional_setups.danger () \def\startRSTdanger{% \startparagraph -\lettrine[Lines=2,Raise=.5,Findent=1em,Nindent=0pt]{\symbol[dbend]\symbol[dbend]}{}% +\lettrine[Lines=2,Raise=.5,Findent=1em,Nindent=0pt]{\symbol[dbend]\kern 1pt\symbol[dbend]}{}% } \let\stopRSTdanger\stopparagraph -- cgit v1.2.3