Page MenuHomePhabricator

Maths syntax bug.
Closed, DuplicatePublicBUG REPORT

Description

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

  1. Go to visual editor.
  2. Use insert button.
  3. Insert math formula.
  4. Use some maths formula like matrices.
  5. Creates a wrong formula, like this: & y \\ z & v \end{bmatrix}\begin{bmatrix} x

What happens?: Error in the math LaTex formula generation.

What should have happened instead?: Obviously fix it.

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

Other information (browser name/version, screenshots, etc.): I think this issue is global issue.

Event Timeline

Hi @Isolatedchimpanzee, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

Insert math formula.

Which exactly? Please provide exact steps to reproduce which leave zero room for interpretation. You can edit the task description by clicking Edit Task. Ideally, a good description should allow any other person to follow these steps (without having to interpret steps) and see the same results. Problems that others can reproduce can get fixed faster. Thanks again!

Environment

OS: Ubuntu 22.04 LTS x86_64

Browser: Firefox 128.0.2 (64-bit)

Wikipedia: English (https://en.wikipedia.org)

Logged in: Yes

Preconditions

VisualEditor enabled.

User has edit permission.

Steps to Reproduce

  1. Open Firefox 128.0.2 on Ubuntu 22.04.
  1. Navigate to https://en.wikipedia.org/wiki/Hambre.
  1. Click Edit (not “Edit source”).
  1. Click inside the first section body to enable typing.
  1. In the editor toolbar, select Insert → More → Formula → Math formula.
  1. In the dialog, scroll down to Matrices.
  1. Select 2×2 matrix.

Expected Result

LaTeX for a 2×2 matrix (e.g. \begin{bmatrix}…) is inserted correctly.

Actual Result

Inserted code is corrupted (matches issue shown in original message).

Repro Rate: 5/5.

Hambre is not an example however this bug appeared on almost all of the article, skip article specification.