Page MenuHomePhabricator

Two single quotes in <code> parsed incorrectly
Closed, InvalidPublic

Description

Author: lupin.wp

Description:
<code>var str1='';</code>
<code>var str2='foo';</code>

generates the html

<code>var str1=<i>;</i></code> <code>var str2='foo';</code>

The first code block should have consecutive single quotes instead of
italicizing the semicolon.


Version: 1.7.x
Severity: normal
URL: http://en.wikipedia.org/w/index.php?title=User:Lupin/sandbox&oldid=49614873

Details

Reference
bz5686

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:12 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz5686.
bzimport added a subscriber: Unknown Object (MLST).

Use <nowiki> etc if you need to suppress wiki markup.

lupin.wp wrote:

Whichever way you look at it, the current behaviour is inconsistent. In the
first line, the quotes give italics; in the second they do not. I don't see how
they can both be correct.

Moreover, the semicolon should not be italicized in the HTML from first line
since it is not enclosed in quotes.

If <code> does not switch off the single quote parsing, then the generated html
should be something like this:

<code>var str1=<i></i>;</code> <code>var str2=<i>foo</i>;</code>

But if <code> does turn off the special single quote behaviour (which seems more
useful to me) then the generated html should be something like this:

<code>var str1='';</code> <code>var str2='foo';</code>

Reopening.

lupin.wp wrote:

Hm, that's not right. Do ignore.