Last modified: 2012-07-24 11:10:22 UTC
When a html comment is tagged with apostrophes as bold or italic then the parser should deliver no visible character, but an apostoph is delivered. Example: ''' ''' is parsed correct '''''' is parsed as ' '''<!-- -->''' is parsed as ' '''''<!-- -->''''' is parsed as ''''' This construct is hardly ever used in plain wiki source code but it is easily created by the use of templates (see http://de.wikipedia.org/w/index.php?title=Prison_Break&oldid=15297064 for example - the apostroph in the first line of the infobox should not be there).
This is hard to fix cause we strip comments before parsing quotes. So doQuotes() see: '''''' '''<!-- -->''' '''''<!-- -->''''' as: '''''' // 6 quotes '''''' // 6 quotes '''''''''' // 10 quotes We only consider the first five quotes and assumes everything before is meant to be text. So 5 consecutive quotes are rendered as <b></b> and the parser render above text as: '<b></b> '<b></b> '''''<b></b> Which is "correct". A possibility would be to actually render comments as HTML comments, but that can possibly be a lot of work for little reward. I would say WONTFIX this bug and let user add a space before or after the comment block so they can fix the bug by themselves :)
This seems like it's related... See the two source pages, especially the lowest section, and look at the leading scare quotes. The diff, has whitespace compression distorting the work around I employed. Basically <pre> ...something ''''C'''' to ...something''' 'C'''' </pre> made in 4-6 places. An true ascii diff utility will show those. Diff:[http://en.wikipedia.org/w/index.php?title=Template%3ACommons-gallery&diff=112418474&oldid=112417275 this] NOTE: this is contrary to the published way the four single quotes are supposed (and USED TO) work. Best regards // ~~~~ P.S. Ad hoc feature suggestion... this page needs a preview screen. Would be really nice to have one in Wiki-email facility too. P.P.S. -- Just one thought... spaces before and after comments not infrequently break things... that good old wonderful grey box kind of break. In particular in doing template coding. Why not parse six and render <nowiki><b><i>'</nowiki>... you can't be parsing that many pages with five or six single quotes!
works fine here.
Still has the issue. Text: '''<!-- -->''' Parse result: <p>' </p> I believe the request is to have it render as: <b></b> Might be a wont fix though.
oh, missed the ! part. yes, still a bug.