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

fig1-2: preview

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

fig2-2: preview

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2018, 7:54 AM
bearND triaged this task as Normal priority.Sep 24 2018, 5:39 PM
bearND moved this task from Needs triage to Backlog on the Product-Infrastructure-Team-Backlog board.
bearND moved this task from Backlog to Upcoming on the Product-Infrastructure-Team-Backlog board.

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

bearND closed this task as Resolved.Oct 15 2018, 2:23 PM