https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-02-25T16:18:34ZRedmineRedmine - Defect #2830: trac lists aren't imported as suchhttps://www.redmine.org/issues/2830?journal_id=76372009-02-25T16:18:34ZMathias Kühn
<ul></ul><p>Check Patch <a class="issue tracker-3 status-1 priority-4 priority-default" title="Patch: Improved Trac-Importer with subversion repository migration (New)" href="https://www.redmine.org/issues/2748">#2748</a> for an updated version of the importer which fixes that issue beside others.</p> Redmine - Defect #2830: trac lists aren't imported as suchhttps://www.redmine.org/issues/2830?journal_id=76552009-02-26T06:04:22ZDaniel Svensson
<ul></ul><p>Ah cool.. here's my solution, it's a bit more strict but does essentially the same thing.</p>
<p>Add following to convert_wiki_text:</p>
<pre>
# alpha/numeric lists
text = text.gsub(/(^[ ]+)(\d+|[a-zA-Z])\.[ ]/) { |s| '#' * $1.length + ' '}
# bullet lists
text = text.gsub(/(^[ ]+)\*[ ]/) { |s| '*' * $1.length + ' '}
</pre>
<p>Test cases:<br /><pre>
puts convert_wiki_text(" 1. test")
puts convert_wiki_text(" 1. test")
puts convert_wiki_text(" * test")
puts convert_wiki_text(" * test")
puts convert_wiki_text(" a. test")
puts convert_wiki_text(" a. test")
</pre></p>
<p>Output:<br /><pre>
# test
## test
* test
** test
# test
## test
</pre></p> Redmine - Defect #2830: trac lists aren't imported as suchhttps://www.redmine.org/issues/2830?journal_id=453202013-02-06T09:24:43ZDaniel Felix
<ul></ul><p>Any news on this?<br />Is anyone able to reproduce this with the current trunk?</p>