summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-22 00:30:43 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-22 00:30:43 +0200
commit4004c91f8cedb2d689024d4842ce79e0d0a0b3b4 (patch)
tree25a37f441d62dff0c4565ddd5a7b94cbd6be82c6
parentf47e04a3723e3aa34a1092c23e1e823d6937fd10 (diff)
downloadcontext-rst-4004c91f8cedb2d689024d4842ce79e0d0a0b3b4.tar.gz
fixed inline markup parsing in single line paragraphs
-rw-r--r--rst_context.lua12
1 files changed, 6 insertions, 6 deletions
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