Page MenuHomePhabricator

Weird behavior of a TextMatch edit check on non-brekable spaces
Closed, DeclinedPublicBUG REPORT

Description

This paragraph in ruwiki:

Параметризуя рациональные дроби полиномов различными числами, можно получать различные факторизации: при параметризации вещественным числом — расширенное поле вещественных, комплексным (не вещественным) — комплексных чисел. Число, используемое для параметризации, есть корень простого (над вещественным полем) полинома, отождествляемого с нулём, т. е. по модулю которого берутся числители и знаменатели (в случае вещественного числа — первой степени, комплексного — квадратный с отрицательным дискриминантом и, соответственно, двумя сопряжёнными комплексными корнями).

from page Комплексное число triggers the check "Проверить пунктуацию" (for fixing punctuation problems with - and em dash) multiple times on NBSPs before dashes -- something that is meant to be already covered and not be replaced.
The regexps currently are (case sensitive):

					"--": "—",
					"\\s-\\s": " — ",
					"\\s-(\\d+)": " −$1",
					"\\s-([а-яёА-ЯЁ]+)": " —$1",
					"([^\\d\\s]+)(\\s—|—\\s)([^\\d\\s]+)": "$1 — $3",
					"([А-ЯЁA-Z][^\\d\\s]*)(?\u003C![XVI]+)—(?![XVI]+)([А-ЯЁA-Z][^\\d\\s]*)": "$1 — $2",
					"([^\\d\\s]+)(?\u003C![XVI]+)—(?![XVI]+)([^\\d\\s]+)": "$1-$2",
					"([XVI]+)(\\s*-\\s*|\\s—|—\\s|\\s—\\s)([XVI]+)": "$1—$3"

The weirdest thing is that I can't reproduce these matches when testing just in JavaScript.

orig: T407664#11970035

Event Timeline

If you use an   entity VE will be able to read the contents of it for find/replace since T418474. That page appears to use a mixture of   and the {{nbsp}} template. Template renderings are not legible to VE nor are they editable as text.

ppelberg triaged this task as Medium priority.Mon, Sep 28, 12:42 AM

Hi Levi - for the reasons that Ed stated above, I'm going to close this ticket. VE can't read template contents and supporting that is something we're unable to prioritize at this time. That said, if this is having a significant impact on textmatch's usefulness on ruwiki, please let me know and we can explore other options.