# The parsoid-compatible option below is only relevant when we are running # parser tests in integrated mode with Parsoid. This option is ignored # when this test file is run with Parsoid in standalone mode. !! options parsoid-compatible=wt2html,wt2wt version=2 !! end !! article Template:1x !! text {{{1}}} !! endarticle !! article Template:definition_list !! text one ::two !! endarticle !! article Help:FAQ !! text help! !! end !! test Simple definition !! options parsoid=wt2html,html2html !! wikitext ;name :Definition !! html
name
Definition
!! end !! test Definition list for indentation only !! wikitext :Indented text !! html
Indented text
!! end !! test Definition list with no space !! wikitext ;name:Definition !! html
name
Definition
!!end !! test Definition list with URL link !! options parsoid=wt2html,html2html !! wikitext ;http://example.com/ :definition !! html/php
http://example.com/
definition
!! html/parsoid
http://example.com/
definition
!! end !! test Definition list with bracketed URL link !! wikitext ;[http://www.example.com/ Example]:Something about it !! html
Example
Something about it
!! end !! test Definition list with wikilink containing colon !! wikitext ;[[Help:FAQ]]:The least-read page on Wikipedia !! html/php
Help:FAQ
The least-read page on Wikipedia
!! html/parsoid
Help:FAQ
The least-read page on Wikipedia
!! end # At Brion's and JeLuF's insistence... :) !! test Definition list with news link containing colon !! options parsoid=wt2html,html2html !! wikitext ;news:alt.wikipedia.rox :This isn't even a real newsgroup! !! html/php
news:alt.wikipedia.rox
This isn't even a real newsgroup!
!! html/parsoid
news:alt.wikipedia.rox
This isn't even a real newsgroup!
!! end !! test Malformed definition list with colon !! wikitext ;news:alt.wikipedia.rox -- don't crash or enter an infinite loop !! html
news:alt.wikipedia.rox -- don't crash or enter an infinite loop
!! end !! test Definition lists: colon in external link text !! options parsoid=wt2html,html2html !! wikitext ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up !! html/php
Wikipedia :The Next Generation
OK, I made that up
!! html/parsoid
Wikipedia :The Next Generation
OK, I made that up
!! end !! test Definition lists: colon in HTML attribute !! wikitext ;bold !! html
bold
!! end !! test Definition lists: self-closed tag !! options parsoid=wt2html,html2html !! wikitext ;one
two :two-line fun !! html
one
two
two-line fun
!! end !! test Definition lists: ignore colons inside tags !! wikitext ;one two : tag fun:::def !! html
one two : tag fun::
def
!! end !! test Definition lists: excess closed tags !! options parsoid=wt2html,html2html !! wikitext ;onetwo :bad tag fun !! html/php
onetwo
bad tag fun
!! html/parsoid
onetwo
bad tag fun
!! end !! test T13748: Literal closing tags !! wikitext
test 1
test test test test test
test 2
test test test test test
!! html
test 1
test test test test test
test 2
test test test test test
!! end !! test Definition and unordered list using wiki syntax nested in unordered list using html tags. !! options parsoid=wt2html,html2html !! wikitext !! html !! end !! test Definition list with empty definition and following paragraph !! wikitext ;term: Paragraph text !! html
term

Paragraph text

!! end !! test Nested definition lists using html syntax !! wikitext
x
a
b
!! html
x
a
b
!! end !! test Definition Lists: No nesting: Multiple dd's !! wikitext ;x :a :b !! html
x
a
b
!! end !! test Definition Lists: Indentation: Regular !! wikitext :i1 ::i2 :::i3 !! html
i1
i2
i3
!! end !! test Definition Lists: Indentation: Missing 1st level !! wikitext ::i2 :::i3 !! html
i2
i3
!! end !! test Definition Lists: Indentation: Multi-level indent !! wikitext :::i3 !! html
i3
!! end !! test Definition Lists: Hacky use to indent tables !! wikitext ::{| |foo |bar |} this text should be left alone !! html
foo bar

this text should be left alone

!! end !! test Definition Lists: Hacky use to indent tables (with content following table) !! wikitext :{| |foo |bar |} this text should be part of the dl !! html/php
foo bar
this text should be part of the dl
!! html/parsoid
foo bar
this text should be part of the dl
!! end !! test Definition Lists: Hacky use to indent tables, with comments (T65979) !! wikitext ::{| |foo |bar |} this text should be left alone !! html/parsoid
foo bar

this text should be left alone

!! end !! test Definition Lists: Hacky use to indent tables, with comment before table !!options parsoid=wt2html !! wikitext ::{| |foo |} !! html/parsoid
foo
!! end # Note that the legacy parser closes the list completely for the # hacky-indent table and then reopens it; Parsoid emits the "expected" # output. Parsoid team regards this as a bug in the legacy parser. !! test Definition Lists: Hack use to indent tables, in a nested list context (T262943) !! wikitext This is a discussion thread. :Parent comment. ::Child comment ::{| |With a |Table! |} !! html/php

This is a discussion thread.

Parent comment.
Child comment
With a Table!
!! html/parsoid

This is a discussion thread.

Parent comment.
Child comment
With a Table!
!! end # The trailing whitespace in this test is to catch a regression in # Parsoid after T54473. !! test Definition Lists: Hacky use to indent tables (WS-insensitive) !! wikitext :{| |a |} !! html/php
a
!! html/parsoid
a
!! end # wt2wt / html2wt will normalize newlines - so disabled those test modes !! test Definition Lists: Hacky use to indent tables (nl-insensitive) !! options parsoid=wt2html,html2html !! wikitext :{| |a |} !! html/php
a
!! html/parsoid
a
!! end ## The PHP parser treats : items (dd) without a corresponding ; item (dt) ## as an empty dt item. It also ignores all but the last ";" when followed ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple ## ";"s. ## ## Ex: ";;t2 ::d2" is transformed into: ## ##
##
t2
##
##
##
##
d2
##
##
##
## ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text ## So, the same wikitext above (;;t2 ::d2) is transformed into: ## ##
##
##
##
t2
##
:d2
##
##
##
## ## All Parsoid only definition list tests have this difference. ## ## See also: https://phabricator.wikimedia.org/T8569 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html !! test Table / list interaction: indented table with lists in table contents !! wikitext :{| |- |a *b |- |c *d |} !! html
a
  • b
c
  • d
!! end !!test Table / list interaction: lists nested in tables nested in indented lists !! wikitext :{| | :a :b | *c *d |} *e *f !! html
a
b
  • c
  • d
!!end !! test Definition Lists: Nesting: Multi-level (Parsoid only) !! wikitext ;t1:d1 ;;t2::d2 ;;;t3:::d3 !! html/parsoid
t1
d1
t2
:d2
t3
::d3
!! end !! test Definition Lists: Nesting: Test 2 !! wikitext ;t1 ::d2 !! html
t1
d2
!! end !! test Definition Lists: Nesting: Test 3 !! wikitext :;t1 ::::d2 !! html
t1
d2
!! end !! test Definition Lists: Nesting: Test 4 !! wikitext ::;t3 :::d3 !! html
t3
d3
!! end ## The Parsoid team believes the following three test exposes a ## bug in the PHP parser. (Parsoid team thinks the PHP parser is ## wrong to close the
after the
containing the