|
|
@@ -54,6 +54,13 @@ output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: table_cell_inline |
|
|
|
label: Multiple inline table cells. |
|
|
|
input: "{|\n | foo || bar || test \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text="\n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagCloseSelfclose(), Text(text=" foo "), TagOpenOpen(wiki_markup="||"), Text(text="td"), TagCloseSelfclose(), Text(text=" bar "),TagOpenOpen(wiki_markup="||"), Text(text="td"), TagCloseSelfclose(), Text(text=" test \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: nowiki_inside_table |
|
|
|
label: Nowiki handles pipe characters in tables. |
|
|
|
input: "{|\n | foo <nowiki>| |- {| |} || ! !!</nowiki> bar \n|}" |
|
|
@@ -86,3 +93,31 @@ name: template_inside_table_cell |
|
|
|
label: Template within table cell. |
|
|
|
input: "{|\n |{{foo\n|bar=baz}} \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text="\n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagCloseSelfclose(), TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="bar"), TemplateParamEquals(), Text(text="baz"), TemplateClose(), Text(text=" \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: table_cell_attributes |
|
|
|
label: Parse table cell style attributes. |
|
|
|
input: "{| \n | name="foo bar"| test \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text=" \n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagAttrQuote(char="\""), Text(text="foo bar"), TagCloseSelfclose(), Text(text=" test \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: table_cell_attributes_quote_with_pipe |
|
|
|
label: Pipe inside an attribute quote should still be used as a style separator. |
|
|
|
input: "{| \n | name="foo|bar"| test \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text=" \n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagAttrQuote(char="\""), Text(text="foo"), TagCloseSelfclose(), Text(text="bar\"| test \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: table_cell_attributes_name_with_pipe |
|
|
|
label: Pipe inside an attribute name should still be used as a style separator. |
|
|
|
input: "{| \n | name|="foo bar"| test \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text=" \n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagCloseSelfclose(), Text(text="=\"foo bar"| test \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
name: table_cell_attributes_pipe_after_equals |
|
|
|
label: Pipe inside an attribute should still be used as a style separator after an equals. |
|
|
|
input: "{| \n | name=|"foo|bar"| test \n|}" |
|
|
|
output: [TagOpenOpen(wiki_markup="{|"), Text(text="table"), TagCloseOpen(), Text(text=" \n "), TagOpenOpen(wiki_markup="|"), Text(text="td"), TagAttrStart(pad_first=" ", pad_before_eq="", pad_after_eq=""), Text(text="name"), TagAttrEquals(), TagCloseSelfclose(), Text(text="\"foo|bar\"| test \n"), TagOpenClose(), Text(text="table"), TagCloseClose()] |