Last modified: 2014-11-02 12:46:53 UTC
The preprocessor knows about links, so that (for example): [[File:Foobar.jpg|caption with [[link|alt=foo]]]] is parsed correctly. However, it doesn't know about the -{ }- variant syntax. As a result: [[File:Foobar.jpg|-{R|caption}-]] is *not* currently parsed correctly.
From IRC: 07:36:15 PM) TimStarling: but it wouldn't be too hard to make the preprocessor annotate it, the same way it does with links (07:36:33 PM) TimStarling: you know the preprocessor is responsible for expanding templates (07:36:55 PM) TimStarling: but it marks up links for the sole purpose of getting correct template DOM (07:37:28 PM) TimStarling: e.g. for parameter splitting in {{ a [[b|c]] }} (07:37:45 PM) TimStarling: it would probably be beneficial for -{}- to be handled in the same way (07:38:15 PM) TimStarling: then {{ a -{b|c}- }} would work in the intuitive way (07:38:10 PM) cscott-free: yes. i think i'm going to add [[File:foobar.jpg|-{R|rawcaption}-]] as a parser test and open a bugzilla for that. for the future.
Change 78330 had a related patch set uploaded by Cscott: Add parserTests for language converter markup. https://gerrit.wikimedia.org/r/78330
btw There's another wikitext snippet that isn't handled well currently: ;-{zh-cn:AAA;zh-tw:BBB}- Is this resolvable with the preprocessor change?
(In reply to comment #3) > ;-{zh-cn:AAA;zh-tw:BBB}- > Is this resolvable with the preprocessor change? Yes, I believe this has the same root cause.
(In reply to comment #4) > (In reply to comment #3) > > ;-{zh-cn:AAA;zh-tw:BBB}- > > Is this resolvable with the preprocessor change? > > Yes, I believe this has the same root cause. Lists are not handled by the preprocessor. The issue here is that the list handler (doBlockLevels) is not aware of -{ }- either and (wrongly) recognizes the embedded colon as a single-line dt/dd pair.
Right. But if the preprocessor lifts out the -{...}- constructs, then doBlockLevels won't get confused. So yes, same root cause.
If you reintroduce language conversion blocks only after doBlockLevels is done, then you'll need to find a different way to parse the contents of those blocks independently of the main content.
One more thing being broken: {| |- | -{R|B}- |}
Also: -{zh-cn:[[Category:A]];zh-tw:[[Category:B]];}- This shouldn't be in both A and B (should it?). We don't want the category to depend on the variant. So maybe it *should* be in both?
I think it should be in neither. (gwicke agrees.) [[Category:foo]] would add it to the 'foo' category. in a variant where foo=>bar, it might appear like [[Category:foo|bar]], and be edited that way by VE, but that wouldn't change the category of the page. Category links inside -{...}- would be forbidden (that is, parsed as plain text).
Change 78330 merged by jenkins-bot: Add parserTests for language converter markup. https://gerrit.wikimedia.org/r/78330
*** Bug 72875 has been marked as a duplicate of this bug. ***
*** Bug 72010 has been marked as a duplicate of this bug. ***