From 23e2f64ec56df0749dc36ea786c2146af159ad26 Mon Sep 17 00:00:00 2001
From: Subramanya Sastry
+
+
+!! end
+
!! test
Strip unsupported table tags
!! options
@@ -13838,9 +13855,9 @@ bar
bar
+
+
=foo=
+ +=foo= + +=foo=
+ +=fooa=
!! wikitext=foo=
- -=foo= - -=foo=
- -=fooa=
!!end # New headings and existing headings are handled differently @@ -21962,15 +22003,26 @@ parsoid=html2wt !! test Headings: 3. Nested inside html with wikitext split by html tags !! options -parsoid=html2wt,wt2wt -!! wikitext -= ='''bold'''=a=
+ +=a=
+ +=a=
!! wikitext=a= -
=a= -
=a= -
=a= -
-!! html/parsoid -=a=
- -=a=
- -=a=
- -=a=
!!end !! test Headings: 6b. Heading chars in SOL context (with trailing newlines) -!! wikitext -=a= +b
-=a= +b
-=a= -b -
=a= -b -
=a= -b -
=a= +
=a= +b
+!! wikitext +=a= -b
-=a= -b
- -=a= -b
+=a= -b
+a +=b=
!! wikitext aa -=b= -
-!! html/parsoid -a -=b= !!end !! test Headings: 6d. Heading chars in SOL context (with interspersed comments) +!! options +parsoid=html2wt +!! html/parsoid +
=a=
+ +=a=
!! wikitext=a= -
=a= -
-!! html/parsoid -=a=
- -=a=
!!end !! test @@ -22176,27 +22195,36 @@ a !! test Lists: 0. Outside nests +!! options +parsoid=html2wt +!! html/parsoid +*foo
+ +#foo
+ +;Foo:bar
!! wikitext*foo -
#foo -
;Foo:bar -
-!! html/parsoid -*foo
- -#foo
- -;Foo:bar
+a *b
+!! wikitext +a +----
-=foo=
-*foo
!! end #### --------------- Tables --------------- @@ -22386,40 +22411,48 @@ HRs: 1. Single line !! test Tables: 1a. Simple example -!! wikitext -{| |}
+!! wikitext +!foo
+!! wikitext +!foo !! end !! test Tables: 1c. No escaping needed -!! wikitext -|foo -!! html +!! options +parsoid=html2wt +!! html/parsoid|foo
+!! wikitext +|foo !! end !! test Tables: 1d. No escaping needed -!! wikitext -|}foo -!! html +!! options +parsoid=html2wt +!! html/parsoid|}foo
+!! wikitext +|}foo !! end !! test @@ -22480,11 +22513,8 @@ parsoid=html2wt !! test Tables: 2c. Nested in td -- no escaping needed -!! wikitext -{| - -|foo!!bar -|} +!! options +parsoid=html2wt !! html/*foo!!bar |
foo!bar |
---|
foo-bar | foo+bar |
foo-bar | foo+bar |
foo
+ bar|baz ++bar +-bar | |
x
+ a|b |
+
foo-bar | foo+bar |
foo-bar | foo+bar |
foo
- bar|baz -+bar --bar | |
x
- a|b |
-
Foo-bar | ++1 | +-2 |
Foo-bar | -+1 | --2 |
<foo | +bar> |
<foo | -bar> |
Fooboo +[Foobar] +x [Foobar] x
!! wikitext [[Foo|Foo''boo'']] [[Foo|[Foobar]]] @@ -22764,10 +22796,6 @@ Links 1. WikiLinks: No escapes needed [Foobar] x [Foobar] x -!! html/parsoid -Fooboo -[Foobar] -x [Foobar] x
!! end !! test @@ -22812,6 +22840,11 @@ parsoid=html2wt !! test Links 3. WikiLinks: No escapes needed +!! options +parsoid=html2wt +!! html/parsoid + !! wikitext [[Foo|[Foobar]] [[Foo|foo|bar]] @@ -22819,9 +22852,6 @@ Links 3. WikiLinks: No escapes needed -!! html/parsoid - !! end !! test @@ -22851,17 +22881,21 @@ parsoid=html2wt !! test Links 5. ExtLinks: No escapes needed +!! options +parsoid=html2wt +!! html/parsoid + !! wikitext [http://google.com [google] !! html/php -!! html/parsoid - !! end !! test Links 6. Addxhttp://example.comy
http://example.com?x
@@ -22895,6 +22929,8 @@ http://example.com(x
x
http://example.com
@@ -22928,6 +22964,8 @@ y
!! test
Links 7b. Don't add spurious
http://example.com.,;:!?\ -http://example.com:
@@ -22942,6 +22980,8 @@ http://example.com.,;:!?\ !! test Links 8. AddRFC 1234
RFC 123y
@@ -22954,6 +22994,8 @@ X
RFC 123?foo
RFC 123&foo
@@ -22972,6 +23014,8 @@ RFC 123&foo
!! test
Links 10. Add
PMID 1234
PMID 123y
@@ -22984,6 +23028,8 @@ X
PMID 123?foo
PMID 123&foo
@@ -23002,6 +23048,8 @@ PMID 123&foo
!! test
Links 12. Add
ISBN 12345678901
ISBN 1234567890x
@@ -23015,6 +23063,8 @@ a
-ISBN 1234567890's !! wikitext @@ -23039,13 +23089,14 @@ parsoid=html2wt Links 15. Link trails can't become link prefixes. !! options language=is +parsoid=html2wt +!! html/parsoid +
!! wikitext [[Söfnuður]]-[[00]] !! html/php -!! html/parsoid - !! end #### --------------- Quotes --------------- @@ -23057,28 +23108,7 @@ language=is !! test 1a. Quotes inside and !! options -parsoid=html2wt,wt2wt -!! wikitext -'''foo' ''foo'' @@ -23101,22 +23131,34 @@ a|!*#-:;+-~[]{}b'''x'' 'foo bar 'baz a|!*#-:;+-~[]{}b'x
+!! wikitext +''[[foohello]]
+[[foohello]]
!! wikitext [[''foo''[[foohello]] -
[[foohello]] -
!! end # FIXME: Escaping one or both of [[ and ]] is also acceptable -- # this is one of the shortcomings of this format !! test 3. Link fragments inside and +!! options +parsoid=html2wt +!! html/parsoid +[[foo]]
+[[foo]]
!! wikitext ''[[foo''[[foo]] -
[[foo]] -
!! end !! test 4. No escaping needed -!! wikitext -'''bar''' -''''bar'''' -'a:b'foo -!! html +!! options +options=html2wt +!! html/parsoid'bar' 'bar' 'a:b'foo
+!! wikitext +'''bar''' +''''bar'''' +'a:b'foo !! end #### ----------- Paragraphs --------------- @@ -23174,6 +23229,15 @@ parsoid=html2wt,wt2wt !! test 1. No unnecessary escapes +!! options +parsoid=html2wt +!! html/parsoid +bar [[foo]] +
=bar [[foo]] +
[[bar [[foo]] +
]]bar [[foo]] +
=bar foo]]= +
!! wikitext barbar [[foo]] -
=bar [[foo]] -
[[bar [[foo]] -
]]bar [[foo]] -
=bar foo]]= -
!!end #### ----------------------- PRE -------------------------- @@ -23199,20 +23256,7 @@ bara -
a -
a(tab) -
a - a -
a - b -
a - b -
a - b -
+parsoid=html2wt !! html/parsoida
@@ -23251,51 +23295,64 @@ a a b +!! html/php +a +
a +
a(tab) +
a + a +
a + b +
a + b +
a + b +
!! end !! test 2. Leading whitespace in non-indent-pre contexts should not be escaped !! options -parsoid -!! wikitext -foo ''a'' - b -foo [1]
+-!! html +!! wikitexta b - c + c
-!! end !! test 4. Leading whitespace in indent-pre suppressing contexts should not be escaped !! options -parsoid -!! wikitext - [[File:Foobar.jpg|thumb|caption]] +options=html2wt !! html/parsoid +!! wikitext + [[File:Foobar.jpg|thumb|caption]] !! end !! test @@ -23311,15 +23368,15 @@ parsoid=html2wt !!test T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block !! options -parsoid -!! wikitext - * foo - * bar -!! html +parsoid=html2wt +!! html/parsoida b - c
+ c
* foo * bar+!! wikitext + * foo + * bar !! end #### --------------- Behavior Switches -------------------- @@ -23351,15 +23408,8 @@ __|__ # We use indent-pre as an indirect way to test for sol-transparent behavior. !! test Behavior switches should be SOL-transparent -!! wikitext - __TOC__ - - - __TOO__ - - __TOC__ foo - -__TOC__ bar +!! options +parsoid=html2wt !! html/parsoid @@ -23369,6 +23419,15 @@ __TOC__ bar
foo
bar+!! wikitext + __TOC__ + + + __TOO__ + + __TOC__ foo + +__TOC__ bar !! end #### --------------- HTML tags --------------- @@ -23380,75 +23439,85 @@ __TOC__ bar !! test 1. a tags !! options -parsoid +parsoid=html2wt +!! html/parsoid +<a href="http://google.com">google</a> !! wikitext google -!! html -<a href="http://google.com">google</a> !! end !! test 2. other tags -!! wikitext -*
<div >foo</div >
+!! wikitext +<ref>foo</ref> +
<ref>bar +
baz</ref> +
!! wikitext<ref>foo</ref> -
<ref>bar -
baz</ref> -
!! end #### --------------- Others --------------- !! test Escaping nowikis -!! wikitext -<nowiki>foo</nowiki> -!! html +!! options +parsoid=html2wt +!! html/parsoid<nowiki>foo</nowiki>
+!! wikitext +<nowiki>foo</nowiki> !! end ## The quote-char in the input is necessary for triggering the bug !! test (Bug 52035) Nowiki-escaping should not get tripped by " :" in text !! options -parsoid=wt2wt,html2wt +parsoid=html2wt +!! html/parsoid +foo's bar :
!! wikitext foo's bar : -!! html -foo's bar :
!! end +#----------- End of wikitext escaping tests -------------- + !! test Tag-like HTML structures are passed through as text -- 2.20.1