Parsoid/Tests:templates

Plain

edit

{{echo|Foo}}

Foo

edit

{{echo|[[Foo|bar]]}}

bar

[[{{echo|Foo}}|bar]

bar

[[Foo|{{echo|bar}}]

bar

{{echo|[[{{echo|Foo}}|bar]]}}

bar

Distinguishing between explicit/implicit targets

edit

[[{{echo|Foo}}]]

Foo

[[{{echo|Foo}}|Foo]]

Foo

edit

{{echo | [http://en.wikipedia.org]}}

[1]

[{{echo|http://en.wikipedia.org}}]

[2]

[{{echo|http://en.wikipedia.org}} {{echo|Wikipedia}}]

Wikipedia

edit

{{echo|ISBN}} 1234567890

ISBN 1234567890

ISBN {{echo|1234567890}}

ISBN 1234567890

Different part of divs

edit

<div {{echo|style}}="color:red;">foo</div>

foo

<div style="{{echo|color:red;}}">foo</div>

foo

<div {{echo|style}}="{{echo|color:red;}}">foo</div>

foo

Templating of partial values of an attribute

edit

<div title="This is a long title with just one piece {{echo|templated}}">foo</div>

foo

<div title="This is a long title with just {{echo|one piece}} templated">foo</div>

foo

<div title="{{echo|This is a long title}} with just one piece templated">foo</div>

foo

Parser functions

edit

{{uc:foo}}

FOO

{{uc:{{lc:FOO}}}}

FOO

Tables

edit

{|style={{echo|'color:blue'}}| |foo |}

foo

{|border=1|{{echo|style}}='color:blue'| |foo |}

foo