jenkins-bot submitted this change.

View Change

Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
[IMPR] Handle <ce>/<chem> tags as <math> aliases

Bug: T283990
Change-Id: I9c336df6e8fd43894f1132db0052887559e68e87
---
M pywikibot/textlib.py
1 file changed, 7 insertions(+), 1 deletion(-)

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


To view, visit change 697610. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9c336df6e8fd43894f1132db0052887559e68e87
Gerrit-Change-Number: 697610
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged