Page MenuHomePhabricator

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

Assigned To
Authored By
SalixAlba
Oct 5 2024, 8:28 PM
Referenced Files
F57594718: image.png
Oct 7 2024, 12:37 PM
F57591078: image.png
Oct 5 2024, 8:28 PM
F57591075: image.png
Oct 5 2024, 8:28 PM

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 (230×88 px, 3 KB)

What should have happened instead?:

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

image.png (243×93 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

Details

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