In the wikitext, a \n between items of a numbered list, breaks the enumeration.
# Some text <math>x=y</math> # Some other text
1 .Some text x=y 1. Some other text
To resolve the issue remove every \n inside items.
To complete the task modify the MediaWikiRenderer.py enumerate callback to remove \n from inside the items text.
Please pull request your work