Defect #2827

{{{foo}}} without spaces incorrectly imported

Added by Daniel Svensson about 3 years ago. Updated about 3 years ago.

Status:New Start date:2009-02-24
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Importers
Target version:-
Affected version:0.8.1 Resolution:

Description

When importing {{{foo}}}, note that there are no spaces between curly braces and the word within them, the result is <pre>. If I instead add space between the braces the result is properly interpreted as <pre>foo</pre>

History

#1 Updated by Daniel Svensson about 3 years ago

Daniel Svensson wrote:

When importing {{{foo}}}, note that there are no spaces between curly braces and the word within them, the result is <pre>. If I instead add space between the braces the result is properly interpreted as <pre>foo</pre>

Humm.. further investigation hints that this might be a problem with one-liner {{{ }}} everywhere no matter if they have spaces or not.

#2 Updated by Daniel Svensson about 3 years ago

Maybe oneliner {{{Inline Code}}} should be translated to Inline Code?

#3 Updated by Daniel Svensson about 3 years ago

Daniel Svensson wrote:

Maybe oneliner {{{Inline Code}}} should be translated to Inline Code?

@Inline Code@
even

#4 Updated by Daniel Svensson about 3 years ago

oh the spam, oh the sorrow.. forgot to mention that is is an issue with the Trac importer.

#5 Updated by Daniel Svensson about 3 years ago

Add following somewhere in convert_wiki_text:

  # Inlined code
  text = text.gsub(/\{\{\{([^\}^\n]+)\}\}\}/) { |s| "@#{$1.strip}@" }

Test cases:

puts convert_wiki_text("{{{ spider pig spider pig }}}")
puts convert_wiki_text("{{{spider pig spider pig}}}")
puts convert_wiki_text("{{{\nspider pig spider pig\n}}}")

Output:

@spider pig spider pig@
@spider pig spider pig@
<pre>
spider pig spider pig
</pre>

Also available in: Atom PDF