diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2021-09-19 12:09:51 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2021-09-21 12:37:42 -0700 |
| commit | c266734448544a118ed80e47deaa2590131c7f84 (patch) | |
| tree | d5793b1dc732456894c96e8ee6829dab9d539388 /test/command/latex-color.md | |
| parent | 5f7e7f539a02818d0a94309b15d648d51d1eaee6 (diff) | |
Use pretty-simple to format native output.
Previously we used our own homespun formatting. But this
produces over-long lines that aren't ideal for diffs in tests.
Easier to use something off-the-shelf and standard.
Closes #7580.
Performance is slower by about a factor of 10, but this isn't
really a problem because native isn't suitable as a serialization
format. (For serialization you should use json, because the reader
is so much faster than native.)
Diffstat (limited to 'test/command/latex-color.md')
| -rw-r--r-- | test/command/latex-color.md | 136 |
1 files changed, 110 insertions, 26 deletions
diff --git a/test/command/latex-color.md b/test/command/latex-color.md index 9fd2585a3..ad24528ec 100644 --- a/test/command/latex-color.md +++ b/test/command/latex-color.md @@ -4,21 +4,42 @@ % pandoc -f latex -t native Hello \textcolor{red}{World} ^D -[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "color: red" ) ] ) + [ Str "World" ] + ] +] ``` ``` % pandoc -f latex -t native \textcolor{red}{Hello} World ^D -[Para [Span ("",[],[("style","color: red")]) [Str "Hello"],Space,Str "World"]] +[ Para + [ Span + ( "", [], [ ( "style", "color: red" ) ] ) + [ Str "Hello" ] + , Space + , Str "World" + ] +] ``` ``` % pandoc -f latex -t native Hello \textcolor{blue}{\textbf{World}} ^D -[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "color: blue" ) ] ) + [ Strong [ Str "World" ] ] + ] +] ``` @@ -26,7 +47,15 @@ Hello \textcolor{blue}{\textbf{World}} % pandoc -f latex -t native Hello \textcolor{blue}{\textbf{World}}. ^D -[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]],Str "."]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "color: blue" ) ] ) + [ Strong [ Str "World" ] ] + , Str "." + ] +] ``` ``` @@ -38,10 +67,16 @@ Hello \textcolor{blue}{\textbf{World}}. \end{itemize} } ^D -[Div ("",[],[("style","color: orange")]) - [BulletList - [[Para [Str "Item",Space,Str "1"]] - ,[Para [Str "Item",Space,Str "2"]]]]] +[ Div + ( "", [], [ ( "style", "color: orange" ) ] ) + [ BulletList + [ + [ Para [ Str "Item", Space, Str "1" ] ] + , + [ Para [ Str "Item", Space, Str "2" ] ] + ] + ] +] ``` ``` @@ -53,11 +88,18 @@ Hello \textcolor{blue}{\textbf{World}}. \end{itemize} } some more text ^D -[Div ("",[],[("style","color: blue")]) - [BulletList - [[Para [Str "Item",Space,Str "1"]] - ,[Para [Str "Item",Space,Str "2"]]]] -,Para [Str "some",Space,Str "more",Space,Str "text"]] +[ Div + ( "", [], [ ( "style", "color: blue" ) ] ) + [ BulletList + [ + [ Para [ Str "Item", Space, Str "1" ] ] + , + [ Para [ Str "Item", Space, Str "2" ] ] + ] + ] +, Para + [ Str "some", Space, Str "more", Space, Str "text" ] +] ``` # `\colorbox{}{}` @@ -67,28 +109,57 @@ Hello \textcolor{blue}{\textbf{World}}. % pandoc -f latex -t native Hello \colorbox{red}{World} ^D -[Para [Str "Hello",Space,Span ("",[],[("style","background-color: red")]) [Str "World"]]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "background-color: red" ) ] ) + [ Str "World" ] + ] +] ``` ``` % pandoc -f latex -t native \colorbox{red}{Hello} World ^D -[Para [Span ("",[],[("style","background-color: red")]) [Str "Hello"],Space,Str "World"]] +[ Para + [ Span + ( "", [], [ ( "style", "background-color: red" ) ] ) + [ Str "Hello" ] + , Space + , Str "World" + ] +] ``` ``` % pandoc -f latex -t native Hello \colorbox{blue}{\textbf{World}} ^D -[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]]]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "background-color: blue" ) ] ) + [ Strong [ Str "World" ] ] + ] +] ``` ``` % pandoc -f latex -t native Hello \colorbox{blue}{\textbf{World}}. ^D -[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]],Str "."]] +[ Para + [ Str "Hello" + , Space + , Span + ( "", [], [ ( "style", "background-color: blue" ) ] ) + [ Strong [ Str "World" ] ] + , Str "." + ] +] ``` ``` @@ -102,10 +173,16 @@ Hello \colorbox{blue}{\textbf{World}}. \end{minipage} } ^D -[Div ("",[],[("style","background-color: orange")]) - [BulletList - [[Para [Str "Item",Space,Str "1"]] - ,[Para [Str "Item",Space,Str "2"]]]]] +[ Div + ( "", [], [ ( "style", "background-color: orange" ) ] ) + [ BulletList + [ + [ Para [ Str "Item", Space, Str "1" ] ] + , + [ Para [ Str "Item", Space, Str "2" ] ] + ] + ] +] ``` ``` @@ -119,9 +196,16 @@ Hello \colorbox{blue}{\textbf{World}}. \end{minipage} } some more text ^D -[Div ("",[],[("style","background-color: blue")]) - [BulletList - [[Para [Str "Item",Space,Str "1"]] - ,[Para [Str "Item",Space,Str "2"]]]] -,Para [Str "some",Space,Str "more",Space,Str "text"]] +[ Div + ( "", [], [ ( "style", "background-color: blue" ) ] ) + [ BulletList + [ + [ Para [ Str "Item", Space, Str "1" ] ] + , + [ Para [ Str "Item", Space, Str "2" ] ] + ] + ] +, Para + [ Str "some", Space, Str "more", Space, Str "text" ] +] ``` |
