Defect #8674

Migration from trac loses lines containing {{{ or }}}

Added by Nicolas Kratz over 11 years ago.

Status:NewStart date:2011-06-23
Priority:NormalDue date:
Assignee:-% Done:

0%

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

Description

In lib/tasks/migrate_from_trac.rake l319 ff., the trac markup for preformatted text {{{ and }}} gets slightly mishandled.

The code presumes that those curly braces will always occur on their own line, which they should but need not, and replaces whole lines matching /\{\{\{/ or /\}\}\}/ with pre tags. Lines of text merely containing those codes are lost in transmogrification.

This affects import of wiki pages, issues and issue status, aka everything run through convert_wiki_text(text).

I ran into the issue on a debian lenny packaged 1.0.1, but the code in trunk looks the same.

I have attached the little patch I used to resolve the issue for me. It's against 1.0.1 but should apply cleanly to trunk. Lines are preserved, and if curlies open and close on the same line, inline code @'s are used instead of pre tags.

migrate_from_trac-pre_fix.patch Magnifier - patch: fix pre handling in trac importer (1.38 KB) Nicolas Kratz, 2011-06-23 22:48

Also available in: Atom PDF