#7447 Text lost in mediawiki importer

unreleased
wont-fix
nobody
General
2015-04-11
2014-06-06
No

When converting https://sourceforge.net/p/allura/pastebin/5391e4847929e541de0160d9 the "Custom WMS map sources" section is lost. This can be tested in an automated test for example changing the history method in TestMediawikiLoader to use the content for one of the 'text' fields.

Discussion

  • Igor Bondarenko - 2014-06-17

    Closed #603.

    It caused by the following paragraph:

    The most important part of this definition is the <[[#url|url]]> entry. It is a template containing specific placeholders, which are encapsulated by curly braces, and specify the requested tile. 
    

    specifically:

    <[[#url|url]]>
    

    _tagPattern here does not match this kind of "tag", so all the section is skipped.

    I've added test to duplicate this in mediawikiimporter:je/42cc_7447 + one more commit that fixes test that was broken before.

    Also, I've committed dirty and quick fix for this case in allura:je/42cc_7447, but I do not sure it won't break some other markup.

    Basically, what I did is changed regex a bit to accept tags that does not start from alphanumeric characters.

    But, again, don't sure it should be committed, since it's pretty dirty fix.

     
  • Igor Bondarenko - 2014-06-17
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2014-06-18
    • status: code-review --> wont-fix
    • QA: Dave Brondsema
    • Milestone: forge-backlog --> forge-jun-27
     
  • Dave Brondsema

    Dave Brondsema - 2014-06-18

    Thanks. I agree it shouldn't be fixed like this. In fact, the Allura test forgewiki.tests.test_converters:test_mediawiki2markdown fails to convert <plugin>.plugin() to &lt;plugin&gt;.plugin() with this change.

    I did cherry pick 04f3d60 into mediawikiimporter:master for the other test fix you made.

     

Log in to post a comment.