Parser: Don't wrap <style> or <link> tags in paragraphs
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 26 Feb 2018 21:49:08 +0000 (16:49 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 28 Feb 2018 19:12:49 +0000 (14:12 -0500)
commitb3e575bb8fa8d48fab825c2fef2b55e67a6cad4c
tree9122a218f2b779aa992e833f8a428f76b8794277
parent4b2f95bed5a9ae0a917264abed2ba1fd9fb78f3c
Parser: Don't wrap <style> or <link> tags in paragraphs

If <style> or <link> tags are by themselves on a line, don't wrap them
in <p> tags. But, at the same time, don't end an existing paragraph if
we find <style> or <link> in the middle (like we would if we just
treated them as block tags).

If <style> or <link> is on a line with other text, though, let it be
wrapped in a paragraph along with that other text.

Bug: T186965
Change-Id: Ide4005842cdab537226aa538cb5f7d8e363ba95d
includes/parser/BlockLevelPass.php
tests/parser/ParserTestRunner.php
tests/parser/parserTests.txt