From 4004c91f8cedb2d689024d4842ce79e0d0a0b3b4 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 22 Sep 2010 00:30:43 +0200 Subject: fixed inline markup parsing in single line paragraphs --- rst_context.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rst_context.lua') diff --git a/rst_context.lua b/rst_context.lua index 016ad5b..9010bb8 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -413,15 +413,15 @@ local inline_parser = P{ link_standalone = C(V"uri") / rst_context.link_standalone, - anon_reference = Cs(V"anon_normal_reference" + V"anon_phrase_reference") + anon_reference = Cs(V"anon_phrase_reference" + V"anon_normal_reference") / rst_context.anon_reference, - anon_normal_reference = (1 - V"underscore" - V"spacing" - V"eol" - V"punctuation" - V"groupchars")^1 * V"double_underscore", + anon_normal_reference = C((1 - V"underscore" - V"spacing" - V"eol" - V"punctuation" - V"groupchars")^1) * V"double_underscore", anon_phrase_reference = (V"bareia" - V"double_bareia") - * C((1 - V"bareia")^1) - * V"bareia" * V"double_underscore" - , + * C((1 - V"bareia")^1) + * V"bareia" * V"double_underscore" + , reference = Cs(V"normal_reference" + V"phrase_reference") / rst_context.reference, @@ -479,7 +479,7 @@ function rst_context.paragraph (data) 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] + str = #data > 1 and helpers.string.wrapat(inline_parser:match(table.concat(data, " ")), 65) or inline_parser:match(data[1]) else str = data end -- cgit v1.2.3