4b9fb7a128
The grid table parsers for markdown and rst was combined into one single parser, slightly changing parsing behavior of both parsers: - The markdown parser now compactifies block content cell-wise: pure text blocks in cells are now treated as paragraphs only if the cell contains multiple paragraphs, and as plain blocks otherwise. Before, this was true only for single-column tables. - The rst parser now accepts newlines and multiple blocks in header cells. Closes: #3638
114 lines
4.7 KiB
Text
114 lines
4.7 KiB
Text
[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
|
|
,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125]
|
|
[[Plain [Str "Right"]]
|
|
,[Plain [Str "Left"]]
|
|
,[Plain [Str "Center"]]
|
|
,[Plain [Str "Default"]]]
|
|
[[[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]]
|
|
,[[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]]
|
|
,[[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]]]
|
|
,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
|
|
,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125]
|
|
[[Plain [Str "Right"]]
|
|
,[Plain [Str "Left"]]
|
|
,[Plain [Str "Center"]]
|
|
,[Plain [Str "Default"]]]
|
|
[[[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]]
|
|
,[[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]]
|
|
,[[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]]]
|
|
,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"]
|
|
,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125]
|
|
[[Plain [Str "Right"]]
|
|
,[Plain [Str "Left"]]
|
|
,[Plain [Str "Center"]]
|
|
,[Plain [Str "Default"]]]
|
|
[[[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]]
|
|
,[[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]]
|
|
,[[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]]]
|
|
,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"]
|
|
,Table [Str "Here\8217s",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325]
|
|
[[Plain [Str "Centered",SoftBreak,Str "Header"]]
|
|
,[Plain [Str "Left",SoftBreak,Str "Aligned"]]
|
|
,[Plain [Str "Right",SoftBreak,Str "Aligned"]]
|
|
,[Plain [Str "Default",Space,Str "aligned"]]]
|
|
[[[Plain [Str "First"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "12.0"]]
|
|
,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
|
|
,[[Plain [Str "Second"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "5.0"]]
|
|
,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]]
|
|
,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"]
|
|
,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325]
|
|
[[Plain [Str "Centered",SoftBreak,Str "Header"]]
|
|
,[Plain [Str "Left",SoftBreak,Str "Aligned"]]
|
|
,[Plain [Str "Right",SoftBreak,Str "Aligned"]]
|
|
,[Plain [Str "Default",Space,Str "aligned"]]]
|
|
[[[Plain [Str "First"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "12.0"]]
|
|
,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
|
|
,[[Plain [Str "Second"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "5.0"]]
|
|
,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]]
|
|
,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
|
|
,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [7.5e-2,7.5e-2,7.5e-2,7.5e-2]
|
|
[[]
|
|
,[]
|
|
,[]
|
|
,[]]
|
|
[[[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]
|
|
,[Plain [Str "12"]]]
|
|
,[[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]
|
|
,[Plain [Str "123"]]]
|
|
,[[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]
|
|
,[Plain [Str "1"]]]]
|
|
,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
|
|
,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325]
|
|
[[]
|
|
,[]
|
|
,[]
|
|
,[]]
|
|
[[[Plain [Str "First"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "12.0"]]
|
|
,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
|
|
,[[Plain [Str "Second"]]
|
|
,[Plain [Str "row"]]
|
|
,[Plain [Str "5.0"]]
|
|
,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]]]
|