Jump to content

Parsoid/Bug test cases

From mediawiki.org

You can directly test round-tripping and newline-stripped round-tripping of this page. Please also report bugs in bugzilla.

extra ‎</pre>

[edit]
''italic''

extra newline after empty dd

[edit]
foo

bar

vs.

foo
baz

bar

extra newlines that transfer from a dd-list to a h2

[edit]

Try this test case:

::foo

<!--bar-->==baz==
foo

baz

dd indentation

[edit]
foo
bar

multiple dds

[edit]
foo
bar
baz

buggy parsed html generated for this template use

[edit]

foo list is enclosed in ul-tags, but bar list is not -- this crashes the serializer.

Double tr (inline and from template):

|-
{{s-off}}

Pipe trick

[edit]

[[San Francisco, California]] is rendered raw, it should be rendered as San Francisco

San Francisco, California

Floating image newline bug

[edit]
Foo [[Image:Bar.jpg|thumb|right]] Baz

round-trips to

Foo
[[Image:Bar.jpg|thumb|right]]
Baz

which then round-trips correctly.

Foo

Baz

Newlines not properly stripped in some single-line contexts

[edit]

The following html will result in broken wikitext:

<li><p>foo
</p><p>bar</p>

Exclamation marks lost

[edit]
!foo

The leading exclamation mark is lost. It is parsed as a <th> when not in a table context.

Pipe marks lost

[edit]
|foo

The leading pipe mark is lost. It is parsed as a <td> when not in a table context.

Table characters marks lost

[edit]
|}foo

The leading table characters are lost. It is parsed as a </table> when not in a table context.

Table header lost

[edit]

'foo' is lost during RT-ing in the table below since it is discarded by the parser.

{| class="wikitable" |+foo
|bar
|}
bar

Nowiki around parts of syntax

[edit]

This might not work even in the longer term. a{{{arg}}}b

b

Nowiki in parameter

[edit]

This ought to work.

Noinclude/includeonly wrongly uses include context in template parameters

[edit]

https://bugzilla.wikimedia.org/show_bug.cgi?id=39113

echoed

[edit]

def noincludedef

plain

[edit]

def noincludedef

[edit]

This link is not recognized as a valid link by Parsoid.

Democracy Now!

Cite extension

[edit]

[1]

  1. foo

Bad parse

[edit]

The nowiki input below gets parsed as a string rather than as a nowiki tag.

Foo <nowiki></pre></nowiki>

Missing parser function?

[edit]

[{{fullurl:VisualEditor:Welcome}}] parses as plain text.

Bad parse in heading tags

[edit]

The wikitext below does not parse as a heading tag in Parsoid. I think "?name=foo" throws it off where name=foo probably gets parsed as a tag attribute.

'''==Faculties<span>http://wp.org?name=foo</span>=='''

Newline stuff

[edit]

Roan: The annoying parts in the HTML output below are:

  • newlines inside <p> tags
  • <p typeof="mw:Placeholder"><br /></p>

Yay

Template:Defaultsort:Vizmeta

Foo

Category:Foo

Bar

Custom#sortkey

Baz

[[Foo]]

Quux

œ

Whee


Template:Foo

Some text content

...

[1]

References

[edit]
  1. foo

Non-string tokens in parser functions stripped

[edit]

{{uc:foo <b>bar</b>}} outputs FOO BAR instead of FOO BAR

Unnecessary pre when template output generates empty string output

[edit]

{{echo|\nbar}} wraps the bar in a pre-tag whereas it should not because of the newline before it.

\nbar

bar

[edit]

Try Foo bar in Parsoid ([[Foo bar]])

Lost self-closing div tag (and other self-closing tags)

[edit]

Commit git SHA 051bf97 added support for detecting auto-inserted tags and suppressing them during serialization. It doesn't handle incorrectly self-closed tags correctly.

<div id="abc" ></div>

Smarter pre-detection in wikitext escaping

[edit]
This caption does not need an indent-pre nowiki protection

This example below when RT-ed in Parsoid will escape the caption because of the leading 'space'. Either the existing start-of-line state is incorrectly set for captions or the wikitext escaping handler needs to recognize that figcaptions will never be seen in SOL context.

[[File:Foo.jpg|thumb| This caption does not need an indent-pre nowiki protection]]

Space-only lines are not treated as paragraph delimiter as expected

[edit]

The following snippet is parsed into one paragraph in Parsoid:

foo

bar