From e450b18e09b90a67dcd8f216216c9fa7c0752038 Mon Sep 17 00:00:00 2001
From: "C. Scott Ananian" foo
+ foo
'foo
+ 'foo
foo
foo
- 'this is about foos family
this is about foo's family
- –
+ –
foo
+bar
+ [foo]
+
+
+
+
+|}
+!! result
+
+
+
+
+!! end
+
+!! test
+Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
+!! options
+parsoid=wt2html
+!! input
+{|
+
+
+
+
+
+
+
+
+
+
+
+
+
+|}
+!! result
+
+
+
+
+!! end
+
+
#--------------------------------------------------------------------
# Transclusion parameter whitespace stripping tests
# Behavior is different for positional and named parameters
@@ -1727,7 +1754,6 @@ Templates: Strip leading and trailing whitespace from named-param values
!! test
Templates: Don't strip whitespace from positional-param values
-!! options
!! input
{{echo|a }}
@@ -1771,6 +1797,19 @@ Templates: Don't strip whitespace from positional-param values
!! end
+!! test
+Templates: Handle empty comment-and-ws-only lines correctly
+!! input
+{{echo|foo
+
+
+bar}}
+!! result
+
+
+
+
+
+
+
+
+
foo|bar -<div> - +
foo|bar +<div> +
!! end +## Bug 52824 +!! test +Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param +!! options +parsoid=html2wt,wt2wt +!! input +{{echo|{{echo|1=bar}}}} +!! result +bar
+!! end + ### ### Parsoid-centric tests for testing RT edge cases for pre ### @@ -2089,7 +2139,9 @@ parsoid=wt2html,wt2wt [[Category:foo]] {{echo| [[Category:foo]]}} !! result - + + + !! end !! test @@ -2100,8 +2152,10 @@ parsoid=wt2html,wt2wt [[Category:foo]] a [[Category:foo]] {{echo|b}} !! result - a b
-
+
+ a
+
+ b
!! end
###
@@ -3657,8 +3711,7 @@ Plain ''italic'''s plain
!! end
# Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
# parser strips. The wikitext contains just the first half of the bold
-# quote pair. (There's also a case where Parsoid nests and
-# differently than the PHP parser.)
+# quote pair.
!! test
Unclosed and unmatched quotes (parsoid)
!! options
@@ -3686,7 +3739,7 @@ Normal text.
Plain ''italic'''s plain
!! result
Bold italic text with bold deactivated in between. -
Bold italic text with italic deactivated in between. +
Bold italic text with italic deactivated in between.
Bold text..
..spanning two paragraphs (should not work).
Bold tag left open @@ -4150,11 +4203,14 @@ Template-generated table cell attributes and cell content !! input {| |{{table_attribs}} +| {{table_attribs}} |} !! result
Foo + | +Foo |
foo |
baz |
He llo He llo
+He llo He llo
+!! end + !! test Parsoid: handle constructor well !! options @@ -5130,9 +5201,30 @@ parsoid !! end -## -## Redirects, Parsoid-only -## +!! test +Parsoid: recognize interlanguage links without a target page +!! options +parsoid +!! input +[[ko:]] +!! result ++
+!! end + +!! test +Parsoid: recognize interwiki links without a target page +!! options +parsoid +!! input +[[:ko:]] +!! result + +!! end + +### +### Redirects, Parsoid-only +### !! test Simple redirect to page !! options @@ -5775,7 +5867,7 @@ parsoid=wt2html,wt2wt !!resultfoo | + +
foo | +
ab
-cd
-a
-b
+ab +ab
+ +cd
+ + +a
+ + +b
+!! end + +!! test +Parsoid: Merge double tds (bug 50603) +!! options +parsoid +!! input +{| +|{{echo|{{!}} foo}} +|} +!! result +foo |
foo |
Bar -
+ +Bar
!!end !!test @@ -7826,24 +7978,24 @@ Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo) Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span) (PHP parser generates misnested html) !! options -parsoid=wt2html,wt2wt +parsoid !!input {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}} !!result -abcde
+abcde
!!end !!test Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div) -(PHP parser generates misnested html) +(PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s) !! options parsoid=wt2html,wt2wt !!input {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}} !!result -foo |
-
|
- bar | -2. baz |
+
|
+ bar | +2. baz |
+
!! end !! test @@ -15660,10 +15815,10 @@ A
A [1]
+A [1]
-A [1]
-A [1]
-A [1] B C}}
+A [1] B C}}
-A [1] B C
-A [1]
-B [1]
-C [2]
- + !!end !!test @@ -15936,7 +16091,7 @@ This should just get lost. - + !!end !!test @@ -15946,7 +16101,7 @@ parsoid !!input {{echo|foo |
foo
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo + +foo
+ + + +foo
+!! end + +!! test +Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes +!! options +parsoid=html2wt +!! input +b
b
b
AB
+AB
+AB
+AB
+ABCD
+!! end + +!! test +2. I/B qoute minimization: wikitext and html tags should not be combined +!! options +parsoid=html2wt +!! input +''A''B + +''A'''''B''' +!! result +AB
+AB
+!! end + +!! test +3. I/B qoute minimization: templated content stops minimization +!! options +parsoid=html2wt +!! input +''A''{{echo|''B''}} + +''A''{{echo|'''''B'''''}} +!! result +AB +
AB +!! end + +!! test +4. I/B qoute minimization: new content should be mimimized with adjacent old content +!! options +parsoid=html2wt +!! input +''AB'' + +'''AB''' + +''A'''B''''' +!! result +
AB
+AB
+AB
!! end # ----------------------------------------------------------------- -- 2.20.1