Page MenuHomePhabricator

Unbalanced parentheses in page-previews when parentheses includes another parentheses inside
Closed, ResolvedPublic

Description

Steps to Reproduce

  1. Log out from wikipedia (or enable options to show page-previews)
  2. Go to Category:国民栄誉賞受賞者
  3. Hover on "羽生結弦" and show page-preview

Actual Results
Preview is partially truncated.

ex:
In article: Some article (abc (def) ghi) blah blah blah.
In preview: Some article ghi) blah blah blah.

Case 1: 羽生結弦
Parentheses are written in full-width characters.
Contains ref tags and spaces.

fig1-1: atricle

argicle.png (249×1 px, 38 KB)

fig1-2: preview

preview.png (734×1 px, 291 KB)

Case 2: バラク・オバマ
Outer parentheses are written in full-width characters, but inner parentheses are in half-width characters. (1st line)
Contains some tags and spaces.

fig2-1: article

article_obama.png (355×1 px, 55 KB)

fig2-2: preview

preview_obama.png (513×972 px, 323 KB)

Expected Results
Original sentences will appear in the preview.

Notes

  1. Language: Japanese
  2. In Japanese articles, most of parentheses are written in full-width characters.
  3. Browser: Firefox Quantum 61.02 (64 bit)

Other cases in original post
スチュワーデス物語 Seems correct.
東京事変 Seems wrong.

Related resources
[[ https://phabricator.wikimedia.org/T183833 | T183833 [Bug report] Removing parentheses breaks chemical formulas ]]
Original post (in Japanese) related to T183833

Event Timeline

Change 462869 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Summary: Update removeNestedParentheticals to support non-Latin parens

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

Mholloway renamed this task from [Bug report] Unbalanced parentheses in page-previews when parentheses includes another parentheses inside to Unbalanced parentheses in page-previews when parentheses includes another parentheses inside.Sep 26 2018, 7:39 AM

Change 462869 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Summary: Update removeNestedParentheticals to support non-Latin parens

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