+!! end
+
!! test
Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
!! wikitext
@@ -1223,6 +1276,16 @@ parsoid
!! end
+!! test
+Properly escape nowiki when combined with other wiki markup
+!! options
+parsoid=html2wt
+!! wikitext
+* </nowiki> tag
+!! html
+
* </nowiki> tag
+!! end
+
###
### Comments
###
@@ -4458,6 +4521,16 @@ Parenthesis in external links, w/ transclusion or comment
!! end
+!! test
+Replace invalid link targets when serializing
+!! options
+parsoid=html2wt
+!! html
+Manual
+!! wikitext
+[[MediaWiki:Badtitletext|Manual]]
+!! end
+
###
### Quotes
###
@@ -5185,6 +5258,23 @@ Table cell with a single comment
!! end
+!! test
+Table-cell after a comment-only-empty-line
+!! wikitext
+{|
+|a
+
+| b
+|}
+!! html/parsoid
+
+
a
+
+
b
+
+
+!! end
+
# The expected HTML structure in this test is debatable. The PHP parser does
# not parse this kind of table at all. The main focus for Parsoid is on
# round-tripping, so this output is ok for now. TODO: revisit!
@@ -5349,6 +5439,54 @@ foo
!!end
+!! test
+Strip unsupported table tags
+!! options
+parsoid=html2wt
+!! html
+
+
+
+
Month
+
Savings
+
+
+
+
+
January
+
$100
+
+
+
February
+
$80
+
+
+
+
+
Sum
+
$180
+
+
+
+!! wikitext
+{|
+
+!Month
+!Savings
+
+|January
+|$100
+
+|-
+|February
+|$80
+
+|Sum
+|$180
+
+|}
+!! end
+
###
### Internal links
###
@@ -19399,6 +19537,47 @@ a
b
!! end
+!! test
+2. Leading whitespace in non-indent-pre contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+foo ''a''
+ b
+!! html
+
+!! end
+
+!! test
+3. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+
+ a
+ b
+ c
+
+!! html
+
+
+ a
+ b
+ c
+
+!! end
+
+!! test
+4. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid
+!! wikitext
+ [[File:Foobar.jpg|thumb|caption]]
+!! html
+!! html/parsoid
+
+!! end
+
#### --------------- Behavior Switches --------------------
!! test
1. Valid behavior switches should be escaped
@@ -19406,8 +19585,10 @@ a
parsoid=html2wt
!! wikitext
__TOC__
+''__TOC__''
!! html
__TOC__
+__TOC__
!! end
!! test
@@ -19799,6 +19980,20 @@ Indented block & table
!!end
+!! test
+Indent and comment before table row
+!! wikitext
+{|
+ |-
+ | there
+|}
+!! html/parsoid
+
+
+
there
+
+!! end
+
!!test
Empty TR followed by a template-generated TR
(Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
@@ -20470,21 +20665,21 @@ foo
!! end
!! test
-Strip leading whitespace when handling indent-pre inducing tags
+Nowiki-wrap leading whitespace when handling indent-pre inducing tags
!! options
parsoid=html2wt
!! wikitext
foo
-bar
+barfoo2
-bar2
+bar2