Extension:Popups removes texts in parentheses from the extract.
https://phabricator.wikimedia.org/diffusion/EPOP/browse/master/src/formatter.js$97
Some chemical formulas have parentheses (e.g. Acetic anhydride).
Thus, if an article contains chemical formulas with parentheses in the head of the article, popup of the link to the article shows broken chemical formulas.
Steps to Reproduce
- Enable Extension:Popups.
- Create an article with chemical formulas parentheses with in the head. e.g. https://en.wikipedia.org/wiki/Acetic_anhydride which has formula (CH3CO)2O.
- Make a link to the article. e.g. https://en.wikipedia.org/wiki/Acetic_acid
- Move mouse to the link and show popup.
Actual Results
The popup only shows the chemical formulas without parentheses (e.g. '2O') wrongly.
Expected Results
The popup shows the chemical formulas (e.g. '(CH3CO)2O') correctly.
Related resource
- This issue is originally reported in https://ja.wikipedia.org/wiki/Wikipedia:%E3%83%90%E3%82%B0%E3%81%AE%E5%A0%B1%E5%91%8A#%E8%A6%81%E7%B4%84%E8%A1%A8%E7%A4%BA%E3%81%A7%E3%80%81%E5%8D%8A%E8%A7%92%E3%81%AE%E4%B8%B8%E6%8B%AC%E5%BC%A7%E3%81%AB%E5%9B%B2%E3%81%BE%E3%82%8C%E3%81%9F%E9%83%A8%E5%88%86%E3%81%8C%E8%A6%8B%E3%81%88%E3%81%AA%E3%81%8F%E3%81%AA%E3%82%8B
- The code to remove parentheticals https://phabricator.wikimedia.org/diffusion/EPOP/browse/master/src/formatter.js$97
- Test to remove parentheticals https://phabricator.wikimedia.org/diffusion/EPOP/browse/master/tests/node-qunit/formatter.test.js$78
- Initial commit to introduce removing parentheticals https://phabricator.wikimedia.org/rEPOPe3ae38f966c12c3abf57fccf49eefcc4ff54bb2f