Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/404871 )
Change subject: Fix crasher from tokenizing headings ...................................................................... Fix crasher from tokenizing headings Introduced in c167933 Fixes the render of many pages in logstash, including, http://localhost:8000/en.wikipedia.org/v3/page/html/User%3A2011arvind/816572769 Change-Id: I54e6078b09202461a5921712d13b800d8d526592 --- M lib/wt2html/pegTokenizer.pegjs M tests/parserTests.txt 2 files changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/71/404871/1 diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs index 44974cd..17c6300 100644 --- a/lib/wt2html/pegTokenizer.pegjs +++ b/lib/wt2html/pegTokenizer.pegjs @@ -517,7 +517,7 @@ // split up equal signs into two equal parts, with at least // one character in the middle. level = Math.floor((s.length - 1) / 2); - c = '='.repeat(s.length - 2 * level); + c = ['='.repeat(s.length - 2 * level)]; s = e = '='.repeat(level); } level = Math.min(6, level); diff --git a/tests/parserTests.txt b/tests/parserTests.txt index c01e750..2cf6aca 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -25350,6 +25350,16 @@ !! end +!! test +Headings: Used as horizontal rule +!! options +parsoid=wt2html +!! wikitext +=============== +!! html/parsoid +<h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6> +!! end + #### --------------- Lists --------------- #### 0. Outside nests (*foo, etc.) #### 1. Nested inside html <ul><li>*foo</li></ul> -- To view, visit https://gerrit.wikimedia.org/r/404871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54e6078b09202461a5921712d13b800d8d526592 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
