Page MenuHomePhabricator

\| should render as a double pipe || rather than a single one |. In MathML and Client-side MathJax modes.
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Set the math formation option to MathML or Client-side MathJax.
  • Enter the formla <math>\|A\|, D(p\|q)</math>

What happens?:

Rendered as

image.png (88×230 px, 3 KB)

What should have happened instead?:

Rendered with a double pipe, in SVG mode, latex is similar.

image.png (93×243 px, 5 KB)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Chrome 129

Event Timeline

Physikerwelt subscribed.

Wow, this is pretty bad. It's surprising that this was not realized before. Maybe a regression?

There is some special code to handle the following operators [ "S", "P", ";", ",", "!", "'", ">" ] If I add "|" to the list the bug goes away.

Change #1078049 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Add \| to list of special operators

https://gerrit.wikimedia.org/r/1078049

@Andreg-p @Krinkle @daniel, maybe you can help me with some code reviews to avoid merge conflicts in the future.

Change #1078049 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Add \| to list of special operators

https://gerrit.wikimedia.org/r/1078049