jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/697610 )
Change subject: [IMPR] Handle <ce>/<chem> tags as <math> aliases ......................................................................
[IMPR] Handle <ce>/<chem> tags as <math> aliases
Bug: T283990 Change-Id: I9c336df6e8fd43894f1132db0052887559e68e87 --- M pywikibot/textlib.py 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 78c7321..c38bde3 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -315,11 +315,17 @@ # extensions _regex_cache[exc] = _tag_regex(exc) result.append(_regex_cache[exc]) - # handle alias + + # handle aliases if exc == 'source': result.append(_tag_regex('syntaxhighlight')) elif exc == 'syntaxhighlight': result.append(_tag_regex('source')) + elif exc == 'chem': + result.append(_tag_regex('ce')) + elif exc == 'math': + result.append(_tag_regex('chem')) + result.append(_tag_regex('ce'))
return result
pywikibot-commits@lists.wikimedia.org