Add \b to regexes in BlockLevelPass to avoid confusing tr & track
authorBrion Vibber <brion@pobox.com>
Fri, 19 May 2017 22:45:48 +0000 (00:45 +0200)
committerBrion Vibber <brion@pobox.com>
Fri, 19 May 2017 22:53:05 +0000 (00:53 +0200)
commit33e4ac5b220b0edbef6774b3d961a3313fbf76e9
tree3a9f596d3a43d283d38b2f9013c6dc16e35878db
parentf58c50e64d779eb5fe51a5678a45f3345fa69441
Add \b to regexes in BlockLevelPass to avoid confusing tr & track

With TimedMediaHandler in video.js mode, videos can be inline,
without a wrapper div.

Previously, in this mode two paragraphs where one contained a
video would end up merged into one paragraph, due to BlockLevelPass
matching "<track .../>" against "<tr" in its regexes.

Added \b to a couple of the regexes to protect against such errors,
and corrected a parser test case that had bad output listed, where
"<link .../>" matched against "<li".

Bug: T165817
Change-Id: I06e82b881f5ebddae5e7df7fb940adfa54f6b659
includes/parser/BlockLevelPass.php
tests/parser/parserTests.txt