Switch from pretty-simple to pretty-show for native output.

Update tests.

Reason:  it turns out that the native output generated by
pretty-simple isn't always readable by the native reader.
According to https://github.com/cdepillabout/pretty-simple/issues/99
it is not a design goal of the library that the rendered values
be readable using 'read'.  This makes it unsuitable for our
purposes.

pretty-show is a bit slower and it uses 4-space indents
(non-configurable), but it doesn't have this serious drawback.
This commit is contained in:
John MacFarlane 2021-09-28 21:17:53 -07:00
parent 8018179b3d
commit 0bdcf415e4
228 changed files with 53152 additions and 54511 deletions

View file

@ -584,7 +584,8 @@ library
unicode-collation >= 0.1.1 && < 0.2, unicode-collation >= 0.1.1 && < 0.2,
zip-archive >= 0.2.3.4 && < 0.5, zip-archive >= 0.2.3.4 && < 0.5,
zlib >= 0.5 && < 0.7, zlib >= 0.5 && < 0.7,
pretty-simple >= 4.0 && < 4.1 pretty-show >= 1.10 && < 1.11,
pretty >= 1.1 && < 1.2
if os(windows) && arch(i386) if os(windows) && arch(i386)
build-depends: basement >= 0.0.10, build-depends: basement >= 0.0.10,
foundation >= 0.0.23 foundation >= 0.0.23

View file

@ -13,23 +13,19 @@ Conversion of a 'Pandoc' document to a string representation.
module Text.Pandoc.Writers.Native ( writeNative ) module Text.Pandoc.Writers.Native ( writeNative )
where where
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text.Lazy as TL import qualified Data.Text as T
import Text.Pandoc.Class.PandocMonad (PandocMonad) import Text.Pandoc.Class.PandocMonad (PandocMonad)
import Text.Pandoc.Definition import Text.Pandoc.Definition
import Text.Pandoc.Options (WriterOptions (..)) import Text.Pandoc.Options (WriterOptions (..))
import Text.Pretty.Simple (pShowOpt, defaultOutputOptionsNoColor, import Text.Show.Pretty (ppDoc)
OutputOptions(..), StringOutputStyle(..)) import Text.PrettyPrint (renderStyle, Style(..), style, char)
-- | Prettyprint Pandoc document. -- | Prettyprint Pandoc document.
writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeNative opts (Pandoc meta blocks) = do writeNative opts (Pandoc meta blocks) = do
let popts = defaultOutputOptionsNoColor{ let style' = style{ lineLength = writerColumns opts,
outputOptionsIndentAmount = 2, ribbonsPerLine = 1.2 }
outputOptionsPageWidth = writerColumns opts, return $ T.pack $ renderStyle style' $
outputOptionsCompact = True,
outputOptionsCompactParens = False,
outputOptionsStringStyle = Literal }
return $
case writerTemplate opts of case writerTemplate opts of
Just _ -> TL.toStrict $ pShowOpt popts (Pandoc meta blocks) <> "\n" Just _ -> ppDoc (Pandoc meta blocks) <> char '\n'
Nothing -> TL.toStrict $ pShowOpt popts blocks Nothing -> ppDoc blocks

View file

@ -4,7 +4,11 @@
Testing: $\mu\foo\eta$. Testing: $\mu\foo\eta$.
^D ^D
[ Para [ Para
[ Str "Testing:", Space, Math InlineMath "\\mu+\\eta", Str "." ] [ Str "Testing:"
, Space
, Math InlineMath "\\mu+\\eta"
, Str "."
]
] ]
``` ```

View file

@ -51,7 +51,9 @@
% pandoc -f html -t native % pandoc -f html -t native
<bdo dir="ltr">foo</bdo> <bdo dir="ltr">foo</bdo>
^D ^D
[ Plain [ Span ( "", [], [ ( "dir", "ltr" ) ] ) [ Str "foo" ] ] ] [ Plain
[ Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "foo" ] ]
]
``` ```
``` ```
@ -60,11 +62,9 @@
^D ^D
[ Plain [ Plain
[ Span [ Span
( "", [], [ ( "dir", "rtl" ) ] ) ( "" , [] , [ ( "dir" , "rtl" ) ] )
[ Str "foo" [ Str "foo"
, Span , Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "bar" ]
( "", [], [ ( "dir", "ltr" ) ] )
[ Str "bar" ]
, Str "baz" , Str "baz"
] ]
] ]
@ -78,7 +78,7 @@ to left.</bdo></p>
^D ^D
[ Para [ Para
[ Span [ Span
( "", [], [ ( "dir", "rtl" ) ] ) ( "" , [] , [ ( "dir" , "rtl" ) ] )
[ Str "This" [ Str "This"
, Space , Space
, Str "text" , Str "text"

View file

@ -29,10 +29,9 @@ These are all pretty interesting facts.
\end{remark} \end{remark}
^D ^D
[ Div [ Div
( "def:tri", [ "definition" ], [] ) ( "def:tri" , [ "definition" ] , [] )
[ Para [ Para
[ Strong [ Strong [ Str "Definition" , Space , Str "1" ]
[ Str "Definition", Space, Str "1" ]
, Space , Space
, Str "(right-angled" , Str "(right-angled"
, Space , Space
@ -41,8 +40,7 @@ These are all pretty interesting facts.
, Space , Space
, Str "A" , Str "A"
, Space , Space
, Emph , Emph [ Str "right-angled" , Space , Str "triangle" ]
[ Str "right-angled", Space, Str "triangle" ]
, Space , Space
, Str "is" , Str "is"
, Space , Space
@ -83,10 +81,9 @@ These are all pretty interesting facts.
] ]
] ]
, Div , Div
( "", [ "lemma" ], [] ) ( "" , [ "lemma" ] , [] )
[ Para [ Para
[ Strong [ Strong [ Str "Lemma" , Space , Str "2" ]
[ Str "Lemma", Space, Str "2" ]
, Str "." , Str "."
, Space , Space
, Space , Space
@ -117,10 +114,9 @@ These are all pretty interesting facts.
] ]
] ]
, Div , Div
( "", [ "proof" ], [] ) ( "" , [ "proof" ] , [] )
[ Para [ Para
[ Emph [ Emph [ Str "Proof." ]
[ Str "Proof." ]
, Space , Space
, Str "This" , Str "This"
, Space , Space
@ -133,11 +129,12 @@ These are all pretty interesting facts.
, Link , Link
( "" ( ""
, [] , []
, , [ ( "reference-type" , "ref" )
[ ( "reference-type", "ref" ), ( "reference", "def:tri" ) ] , ( "reference" , "def:tri" )
]
) )
[ Str "Definition\160\&1" ] [ Str "Definition\160\&1" ]
( "#def:tri", "" ) ( "#def:tri" , "" )
, Space , Space
, Str "since" , Str "since"
, Space , Space
@ -147,10 +144,9 @@ These are all pretty interesting facts.
] ]
] ]
, Div , Div
( "thm:py", [ "theorem" ], [] ) ( "thm:py" , [ "theorem" ] , [] )
[ Para [ Para
[ Strong [ Strong [ Str "Theorem" , Space , Str "3" ]
[ Str "Theorem", Space, Str "3" ]
, Space , Space
, Str "(Pythagorean" , Str "(Pythagorean"
, Space , Space
@ -186,10 +182,9 @@ These are all pretty interesting facts.
] ]
] ]
, Div , Div
( "", [ "remark" ], [] ) ( "" , [ "remark" ] , [] )
[ Para [ Para
[ Emph [ Emph [ Str "Remark" , Space , Str "1" ]
[ Str "Remark", Space, Str "1" ]
, Str "." , Str "."
, Space , Space
, Space , Space

View file

@ -12,7 +12,7 @@ nested div
::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::
^D ^D
[ Div [ Div
( "", [ "warning" ], [] ) ( "" , [ "warning" ] , [] )
[ Para [ Para
[ Str "This" [ Str "This"
, Space , Space
@ -23,11 +23,11 @@ nested div
, Str "warning!" , Str "warning!"
] ]
, OrderedList , OrderedList
( 1, Decimal, Period ) ( 1 , Decimal , Period )
[ [ Plain [ Str "list" ] ], [ Plain [ Str "another" ] ] ] [ [ Plain [ Str "list" ] ] , [ Plain [ Str "another" ] ] ]
, Div , Div
( "myid", [ "class" ], [ ( "key", "val" ) ] ) ( "myid" , [ "class" ] , [ ( "key" , "val" ) ] )
[ Para [ Str "nested", Space, Str "div" ] ] [ Para [ Str "nested" , Space , Str "div" ] ]
] ]
] ]
``` ```
@ -38,7 +38,14 @@ foo
::: :::
bar bar
^D ^D
[ Para [ Str "foo", SoftBreak, Str ":::", SoftBreak, Str "bar" ] ] [ Para
[ Str "foo"
, SoftBreak
, Str ":::"
, SoftBreak
, Str "bar"
]
]
``` ```
``` ```
@ -50,7 +57,7 @@ And another.
::::: :::::
^D ^D
[ Div [ Div
( "", [ "Warning" ], [] ) ( "" , [ "Warning" ] , [] )
[ Para [ Para
[ Str "Here" [ Str "Here"
, Space , Space
@ -60,8 +67,7 @@ And another.
, Space , Space
, Str "paragraph." , Str "paragraph."
] ]
, Para , Para [ Str "And" , Space , Str "another." ]
[ Str "And", Space, Str "another." ]
] ]
] ]
``` ```

View file

@ -10,7 +10,9 @@ Note[^1].
[ Para [ Para
[ Str "Note" [ Str "Note"
, Note , Note
[ Para [ Str "the", Space, Str "first", Space, Str "note." ] ] [ Para
[ Str "the" , Space , Str "first" , Space , Str "note." ]
]
, Str "." , Str "."
] ]
] ]

View file

@ -2,5 +2,7 @@
% pandoc -f latex+raw_tex -t native % pandoc -f latex+raw_tex -t native
\noindent hi \noindent hi
^D ^D
[ Para [ RawInline ( Format "latex" ) "\\noindent ", Str "hi" ] ] [ Para
[ RawInline (Format "latex") "\\noindent " , Str "hi" ]
]
``` ```

View file

@ -21,8 +21,9 @@
</table> </table>
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing (Caption
Nothing
[ Plain [ Plain
[ Str "Demonstration" [ Str "Demonstration"
, Space , Space
@ -34,73 +35,76 @@
, Space , Space
, Str "syntax." , Str "syntax."
] ]
])
[ ( AlignRight , ColWidthDefault )
, ( AlignLeft , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
] ]
) (TableHead
[ ( "" , [] , [] )
( AlignRight, ColWidthDefault )
,
( AlignLeft, ColWidthDefault )
,
( AlignCenter, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
]
( TableHead
( "", [], [] )
[ Row [ Row
( "", [ "header" ], [] ) ( "" , [ "header" ] , [] )
[ Cell [ Cell
( "", [], [] ) AlignRight ( "" , [] , [] )
( RowSpan 1 ) AlignRight
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Right" ] ] [ Plain [ Str "Right" ] ]
, Cell , Cell
( "", [], [] ) AlignLeft ( "" , [] , [] )
( RowSpan 1 ) AlignLeft
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Left" ] ] [ Plain [ Str "Left" ] ]
, Cell , Cell
( "", [], [] ) AlignCenter ( "" , [] , [] )
( RowSpan 1 ) AlignCenter
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Center" ] ] [ Plain [ Str "Center" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Default" ] ] [ Plain [ Str "Default" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [ "odd" ], [] ) ( "" , [ "odd" ] , [] )
[ Cell [ Cell
( "", [], [] ) AlignRight ( "" , [] , [] )
( RowSpan 1 ) AlignRight
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignLeft ( "" , [] , [] )
( RowSpan 1 ) AlignLeft
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignCenter ( "" , [] , [] )
( RowSpan 1 ) AlignCenter
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```
@ -116,47 +120,48 @@
</table> </table>
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignRight , ColWidthDefault )
( AlignRight, ColWidthDefault ) , ( AlignLeft , ColWidthDefault )
, , ( AlignCenter , ColWidthDefault )
( AlignLeft, ColWidthDefault ) , ( AlignRight , ColWidthDefault )
,
( AlignCenter, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
] ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [ "odd" ], [] ) ( "" , [ "odd" ] , [] )
[ Cell [ Cell
( "", [], [] ) AlignRight ( "" , [] , [] )
( RowSpan 1 ) AlignRight
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignLeft ( "" , [] , [] )
( RowSpan 1 ) AlignLeft
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignCenter ( "" , [] , [] )
( RowSpan 1 ) AlignCenter
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
, Cell , Cell
( "", [], [] ) AlignRight ( "" , [] , [] )
( RowSpan 1 ) AlignRight
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ] [ Plain [ Str "12" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -9,9 +9,9 @@
^D ^D
[ Para [ Para
[ Image [ Image
( "fig:setminus", [], [ ( "width", "80%" ) ] ) ( "fig:setminus" , [] , [ ( "width" , "80%" ) ] )
[ Str "Set", Space, Str "subtraction" ] [ Str "Set" , Space , Str "subtraction" ]
( "setminus.png", "fig:" ) ( "setminus.png" , "fig:" )
] ]
] ]
``` ```

View file

@ -4,7 +4,9 @@
\section{A section}\label{foo} \section{A section}\label{foo}
} }
^D ^D
[ Header 1 ( "foo", [], [] ) [ Str "A", Space, Str "section" ] ] [ Header
1 ( "foo" , [] , [] ) [ Str "A" , Space , Str "section" ]
]
``` ```
``` ```
@ -14,8 +16,10 @@
} }
^D ^D
[ Div [ Div
( "bar", [], [] ) ( "bar" , [] , [] )
[ Header 1 ( "foo", [], [] ) [ Str "A", Space, Str "section" ] ] [ Header
1 ( "foo" , [] , [] ) [ Str "A" , Space , Str "section" ]
]
] ]
``` ```
@ -23,7 +27,12 @@
% pandoc -f latex -t native % pandoc -f latex -t native
Bar \hypertarget{foo}{Foo} Bar \hypertarget{foo}{Foo}
^D ^D
[ Para [ Str "Bar", Space, Span ( "foo", [], [] ) [ Str "Foo" ] ] ] [ Para
[ Str "Bar"
, Space
, Span ( "foo" , [] , [] ) [ Str "Foo" ]
]
]
``` ```
``` ```
@ -34,6 +43,8 @@ bar
\end{verbatim} \end{verbatim}
} }
^D ^D
[ Div ( "foo", [], [] ) [ CodeBlock ( "", [], [] ) "bar" ] ] [ Div
( "foo" , [] , [] ) [ CodeBlock ( "" , [] , [] ) "bar" ]
]
``` ```

View file

@ -9,7 +9,10 @@ E&=&F
\end{eqnarray} \end{eqnarray}
^D ^D
[ Para [ Para
[ Math DisplayMath "\\begin{aligned}\nA&=&B,\\\\\nC&=&D,\\\\\n%\\end{eqnarray}\n%\\begin{eqnarray}\nE&=&F\\end{aligned}" ] [ Math
DisplayMath
"\\begin{aligned}\nA&=&B,\\\\\nC&=&D,\\\\\n%\\end{eqnarray}\n%\\begin{eqnarray}\nE&=&F\\end{aligned}"
]
] ]
``` ```

View file

@ -10,6 +10,8 @@
a<?php echo "1" ; ?> a<?php echo "1" ; ?>
^D ^D
[ Para [ Para
[ Str "a", RawInline ( Format "html" ) "<?php echo \"1\" ; ?>" ] [ Str "a"
, RawInline (Format "html") "<?php echo \"1\" ; ?>"
]
] ]
``` ```

View file

@ -7,9 +7,9 @@ Magnificent \mycolor{} header.
^D ^D
[ Para [ Para
[ Image [ Image
( "", [], [ ( "width", "17cm" ) ] ) ( "" , [] , [ ( "width" , "17cm" ) ] )
[ Str "image" ] [ Str "image" ]
( "red/header", "" ) ( "red/header" , "" )
, SoftBreak , SoftBreak
, Str "Magnificent" , Str "Magnificent"
, Space , Space

View file

@ -9,5 +9,5 @@
% pandoc -t native % pandoc -t native
i<j-1, j>k i<j-1, j>k
^D ^D
[ Para [ Str "i<j-1,", Space, Str "j>k" ] ] [ Para [ Str "i<j-1," , Space , Str "j>k" ] ]
``` ```

View file

@ -8,41 +8,44 @@
----- ------------------------------------------------ ----- ------------------------------------------------
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignRight , ColWidth 8.333333333333333e-2 )
( AlignRight, ColWidth 8.333333333333333 e- 2 ) , ( AlignLeft , ColWidth 0.6805555555555556 )
,
( AlignLeft, ColWidth 0.6805555555555556 )
] ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "foo" ] ] [ Plain [ Str "foo" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "bar" ] ] [ Plain [ Str "bar" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "foo" ] ] [ Plain [ Str "foo" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Plain
[ Str "this" [ Str "this"
, Space , Space
@ -62,6 +65,6 @@
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -5,7 +5,7 @@ See #3401 and <http://orgmode.org/manual/Macro-replacement.html>
#+MACRO: HELLO /Hello, $1/ #+MACRO: HELLO /Hello, $1/
{{{HELLO(World)}}} {{{HELLO(World)}}}
^D ^D
[ Para [ Emph [ Str "Hello,", Space, Str "World" ] ] ] [ Para [ Emph [ Str "Hello," , Space , Str "World" ] ] ]
``` ```
Inverted argument order Inverted argument order

View file

@ -10,6 +10,9 @@
:foo:`text` :foo:`text`
^D ^D
[ Para [ Para
[ Code ( "", [ "interpreted-text" ], [ ( "role", "foo" ) ] ) "text" ] [ Code
( "" , [ "interpreted-text" ] , [ ( "role" , "foo" ) ] )
"text"
]
] ]
``` ```

View file

@ -10,20 +10,13 @@ Text
More text More text
^D ^D
[ Para [ Para [ Str "Text" ]
[ Str "Text" ] , Header 1 ( "subsection" , [] , [] ) [ Str "Subsection" ]
, Header 1 , Para [ Str "Included" , Space , Str "text" ]
( "subsection", [], [] ) , Plain [ Str "Lorem" , Space , Str "ipsum." ]
[ Str "Subsection" ]
, Para
[ Str "Included", Space, Str "text" ]
, Plain
[ Str "Lorem", Space, Str "ipsum." ]
, CodeBlock , CodeBlock
( "", [ "haskell" ], [] ) "putStrLn outString\n" ( "" , [ "haskell" ] , [] ) "putStrLn outString\n"
, RawBlock , RawBlock (Format "latex") "\\emph{Hello}"
( Format "latex" ) "\\emph{Hello}" , Para [ Str "More" , Space , Str "text" ]
, Para
[ Str "More", Space, Str "text" ]
] ]
``` ```

View file

@ -11,20 +11,18 @@
not continuation not continuation
^D ^D
[ BulletList [ BulletList
[ [ [ Plain [ Str "a" ]
[ Plain
[ Str "a" ]
, BulletList , BulletList
[ [ Plain [ Str "b" ], BulletList [ [ Plain [ Str "c" ] ] ] ] ] [ [ Plain [ Str "b" ]
, BulletList [ [ Plain [ Str "c" ] ] ]
] ]
, ]
[ CodeBlock ( "", [], [] ) "code" ] ]
, [ CodeBlock ( "" , [] , [] ) "code" ]
] ]
, OrderedList , OrderedList
( 1000, Decimal, Period ) ( 1000 , Decimal , Period ) [ [ Plain [ Str "one" ] ] ]
[ [ Plain [ Str "one" ] ] ] , CodeBlock ( "" , [] , [] ) "not continuation"
, CodeBlock
( "", [], [] ) "not continuation"
] ]
``` ```
@ -41,15 +39,14 @@
continuation continuation
^D ^D
[ BulletList [ BulletList
[ [ [ Plain [ Str "a" ] ]
[ Plain [ Str "a" ] ] , [ Plain [ Str "b" ]
, , BulletList [ [ Plain [ Str "c" ] ] ]
[ Plain [ Str "b" ], BulletList [ [ Plain [ Str "c" ] ] ] ] ]
, , [ CodeBlock ( "" , [] , [] ) "not code" ]
[ CodeBlock ( "", [], [] ) "not code" ]
] ]
, OrderedList , OrderedList
( 1000, Decimal, Period ) ( 1000 , Decimal , Period )
[ [ Para [ Str "one" ], Para [ Str "continuation" ] ] ] [ [ Para [ Str "one" ] , Para [ Str "continuation" ] ] ]
] ]
``` ```

View file

@ -25,44 +25,41 @@ on Windows builds.
+---+---+ +---+---+
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignDefault , ColWidth 5.555555555555555e-2 )
( AlignDefault, ColWidth 5.555555555555555 e- 2 ) , ( AlignDefault , ColWidth 5.555555555555555e-2 )
,
( AlignDefault, ColWidth 5.555555555555555 e- 2 )
] ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ] [ Plain [ Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ] [ Plain [ Str "2" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
( RowSpan 1 )
( ColSpan 1 ) []
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
( RowSpan 1 )
( ColSpan 1 ) []
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -3,9 +3,10 @@
\subfile{command/sub-file-chapter-1} \subfile{command/sub-file-chapter-1}
\subfile{command/sub-file-chapter-2} \subfile{command/sub-file-chapter-2}
^D ^D
[ Header 1 [ Header
( "chapter-1", [], [] ) 1
[ Str "Chapter", Space, Str "1" ] ( "chapter-1" , [] , [] )
[ Str "Chapter" , Space , Str "1" ]
, Para , Para
[ Str "This" [ Str "This"
, Space , Space
@ -25,9 +26,10 @@
, Space , Space
, Str "file." , Str "file."
] ]
, Header 1 , Header
( "chapter-2", [], [] ) 1
[ Str "Chapter", Space, Str "2" ] ( "chapter-2" , [] , [] )
[ Str "Chapter" , Space , Str "2" ]
, Para , Para
[ Str "This" [ Str "This"
, Space , Space
@ -58,8 +60,8 @@
\subfile{command/sub-file-chapter-2} \subfile{command/sub-file-chapter-2}
^D ^D
[ RawBlock [ RawBlock
( Format "latex" ) "\\subfile{command/sub-file-chapter-1}" (Format "latex") "\\subfile{command/sub-file-chapter-1}"
, RawBlock , RawBlock
( Format "latex" ) "\\subfile{command/sub-file-chapter-2}" (Format "latex") "\\subfile{command/sub-file-chapter-2}"
] ]
``` ```

View file

@ -6,74 +6,87 @@
:file: command/3533-rst-csv-tables.csv :file: command/3533-rst-csv-tables.csv
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [ Plain [ Str "Test" ] ] ) (Caption Nothing [ Plain [ Str "Test" ] ])
[ [ ( AlignDefault , ColWidth 0.4 )
( AlignDefault, ColWidth 0.4 ) , ( AlignDefault , ColWidth 0.2 )
, , ( AlignDefault , ColWidth 0.4 )
( AlignDefault, ColWidth 0.2 )
,
( AlignDefault, ColWidth 0.4 )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Flavor" ] ] [ Plain [ Str "Flavor" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Price" ] ] [ Plain [ Str "Price" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Slogan" ] ] [ Plain [ Str "Slogan" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Albatross" ] ] [ Plain [ Str "Albatross" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2.99" ] ] [ Plain [ Str "2.99" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
[ Plain [ Str "On", Space, Str "a", Space, Str "stick!" ] ] (ColSpan 1)
[ Plain
[ Str "On"
, Space
, Str "a"
, Space
, Str "stick!"
]
]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
[ Plain [ Str "Crunchy", Space, Str "Frog" ] ] (ColSpan 1)
[ Plain [ Str "Crunchy" , Space , Str "Frog" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1.49" ] ] [ Plain [ Str "1.49" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Plain
[ Str "If" [ Str "If"
, Space , Space
@ -105,7 +118,7 @@
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```
@ -121,78 +134,81 @@
'dog''s' 2 3 'dog''s' 2 3
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [ Plain [ Str "Test" ] ] ) (Caption Nothing [ Plain [ Str "Test" ] ])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
, , ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
( RowSpan 1 )
( ColSpan 1 ) []
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "a" ] ] [ Plain [ Str "a" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "b" ] ] [ Plain [ Str "b" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "cat's" ] ] [ Plain [ Str "cat's" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ] [ Plain [ Str "3" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "4" ] ] [ Plain [ Str "4" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "dog's" ] ] [ Plain [ Str "dog's" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ] [ Plain [ Str "2" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ] [ Plain [ Str "3" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```
@ -204,33 +220,34 @@
"1","\"" "1","\""
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [ Plain [ Str "Test" ] ] ) (Caption Nothing [ Plain [ Str "Test" ] ])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ] [ Plain [ Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\"" ] ] [ Plain [ Str "\"" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -33,8 +33,7 @@ I want to explain the interface of \lstinline[language=Java]{public class MyClas
, Space , Space
, Str "of" , Str "of"
, Space , Space
, Code , Code ( "" , [ "java" ] , [] ) "public class MyClass"
( "", [ "java" ], [] ) "public class MyClass"
, Str "." , Str "."
] ]
] ]
@ -75,8 +74,7 @@ I want to explain the interface of \mintinline[linenos]{java}{public class MyCla
, Space , Space
, Str "of" , Str "of"
, Space , Space
, Code , Code ( "" , [ "java" ] , [] ) "public class MyClass"
( "", [ "java" ], [] ) "public class MyClass"
, Str "." , Str "."
] ]
] ]

View file

@ -7,7 +7,7 @@ Generalized raw attributes.
foo bar foo bar
``` ```
^D ^D
[ RawBlock ( Format "ms" ) ".MACRO\nfoo bar" ] [ RawBlock (Format "ms") ".MACRO\nfoo bar" ]
```` ````
```` ````
@ -24,5 +24,5 @@ Hi `there`{=ms}.
foo bar foo bar
~~~ ~~~
^D ^D
[ RawBlock ( Format "ms" ) ".MACRO\nfoo bar" ] [ RawBlock (Format "ms") ".MACRO\nfoo bar" ]
```` ````

View file

@ -16,8 +16,9 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ ( "acronym-label", "API" ), ( "acronym-form", "plural+short" ) ] , ( "acronym-form" , "plural+short" )
]
) )
[ Str "APIs" ] [ Str "APIs" ]
, Str "." , Str "."
@ -27,11 +28,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+short" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+short" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -55,11 +53,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
[ Span [ Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+long" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -79,11 +74,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+long" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -101,11 +93,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
[ Span [ Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+long" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -125,11 +114,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+long" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+long" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -147,11 +133,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
[ Span [ Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+full" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+full" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -171,11 +154,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+full" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+full" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -193,11 +173,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
[ Span [ Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+abbrv" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+abbrv" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -217,11 +194,8 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+abbrv" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+abbrv" )
] ]
) )
[ Str "API" ] [ Str "API" ]
@ -249,8 +223,9 @@ Many programming languages provide \acp{API}. Each \ac{API} should provide a doc
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ ( "acronym-label", "API" ), ( "acronym-form", "plural+short" ) ] , ( "acronym-form" , "plural+short" )
]
) )
[ Str "APIs" ] [ Str "APIs" ]
, Str "." , Str "."
@ -260,11 +235,8 @@ Many programming languages provide \acp{API}. Each \ac{API} should provide a doc
, Span , Span
( "" ( ""
, [] , []
, , [ ( "acronym-label" , "API" )
[ , ( "acronym-form" , "singular+short" )
( "acronym-label", "API" )
,
( "acronym-form", "singular+short" )
] ]
) )
[ Str "API" ] [ Str "API" ]

View file

@ -6,11 +6,8 @@ hello
\endmulti \endmulti
^D ^D
[ RawBlock [ RawBlock (Format "tex") "\\multi"
( Format "tex" ) "\\multi" , Para [ Str "hello" ]
, Para , RawBlock (Format "tex") "\\endmulti"
[ Str "hello" ]
, RawBlock
( Format "tex" ) "\\endmulti"
] ]
``` ```

View file

@ -4,8 +4,7 @@
Same but bzip2 it and nice it <tt>zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org "> /storage/c-3po/tank-storage-data-svn.dmp.bz2"</tt> Same but bzip2 it and nice it <tt>zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org "> /storage/c-3po/tank-storage-data-svn.dmp.bz2"</tt>
^D ^D
[ Para [ Para [ Quoted DoubleQuote [ Str "Hello" ] ]
[ Quoted DoubleQuote [ Str "Hello" ] ]
, Para , Para
[ Str "Same" [ Str "Same"
, Space , Space
@ -22,10 +21,8 @@ Same but bzip2 it and nice it <tt>zfs send tank/storage/data/svn@daily-2014-03-2
, Str "it" , Str "it"
, Space , Space
, Code , Code
( "" ( "" , [] , [] )
, [] "zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org \"> /storage/c-3po/tank-storage-data-svn.dmp.bz2\""
, []
) "zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org \"> /storage/c-3po/tank-storage-data-svn.dmp.bz2\""
] ]
] ]
``` ```

View file

@ -53,7 +53,7 @@
% pandoc -f latex -t native % pandoc -f latex -t native
\SI{25}{\square\meter} \SI{25}{\square\meter}
^D ^D
[ Para [ Str "25\160m", Superscript [ Str "2" ] ] ] [ Para [ Str "25\160m" , Superscript [ Str "2" ] ] ]
``` ```
``` ```
@ -110,11 +110,9 @@
^D ^D
[ Para [ Para
[ Str "10\160m" [ Str "10\160m"
, Superscript , Superscript [ Str "2" ]
[ Str "2" ]
, Str "\8211\&20\160m" , Str "\8211\&20\160m"
, Superscript , Superscript [ Str "2" ]
[ Str "2" ]
] ]
] ]
``` ```
@ -140,11 +138,9 @@
^D ^D
[ Para [ Para
[ Str "10\160m" [ Str "10\160m"
, Superscript , Superscript [ Str "4" ]
[ Str "4" ]
, Str "\8211\&20\160m" , Str "\8211\&20\160m"
, Superscript , Superscript [ Str "4" ]
[ Str "4" ]
] ]
] ]
``` ```
@ -156,11 +152,9 @@
^D ^D
[ Para [ Para
[ Str "10\160m" [ Str "10\160m"
, Superscript , Superscript [ Str "2" ]
[ Str "2" ]
, Str "\8211\&20\160m" , Str "\8211\&20\160m"
, Superscript , Superscript [ Str "2" ]
[ Str "2" ]
] ]
] ]
``` ```
@ -186,11 +180,9 @@
^D ^D
[ Para [ Para
[ Str "10\160m" [ Str "10\160m"
, Superscript , Superscript [ Str "4" ]
[ Str "4" ]
, Str "\8211\&20\160m" , Str "\8211\&20\160m"
, Superscript , Superscript [ Str "4" ]
[ Str "4" ]
] ]
] ]
``` ```

View file

@ -45,9 +45,9 @@ Software developers create \cicd pipelines to… Following issue can be resolved
, Note , Note
[ Para [ Para
[ Link [ Link
( "", [], [] ) ( "" , [] , [] )
[ Str "https://en.wikipedia.org/wiki/CI/CD" ] [ Str "https://en.wikipedia.org/wiki/CI/CD" ]
( "https://en.wikipedia.org/wiki/CI/CD", "" ) ( "https://en.wikipedia.org/wiki/CI/CD" , "" )
] ]
] ]
, Space , Space
@ -65,5 +65,5 @@ Software developers create \cicd pipelines to… Following issue can be resolved
\cicd\pipeline. \cicd\pipeline.
^D ^D
[ Para [ Str "CI/CD", Space, Str "pipeline." ] ] [ Para [ Str "CI/CD" , Space , Str "pipeline." ] ]
``` ```

View file

@ -16,77 +16,83 @@ Results marker can be hidden in block attributes (#3706)
| 3 | La | | 3 | La |
^D ^D
[ Div [ Div
( "tab", [], [] ) ( "tab" , [] , [] )
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [ Plain [ Str "Lalelu." ] ] ) (Caption Nothing [ Plain [ Str "Lalelu." ] ])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Id" ] ] [ Plain [ Str "Id" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Desc" ] ] [ Plain [ Str "Desc" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ] [ Plain [ Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ] [ Plain [ Str "La" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ] [ Plain [ Str "2" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ] [ Plain [ Str "La" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ] [ Plain [ Str "3" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ] [ Plain [ Str "La" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
] ]
``` ```

View file

@ -6,41 +6,48 @@
\end{tabular} \end{tabular}
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ ( AlignCenter, ColWidthDefault ), ( AlignCenter, ColWidthDefault ) ] [ ( AlignCenter , ColWidthDefault )
( TableHead ( "", [], [] ) [] ) , ( AlignCenter , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "A" ] ] [ Plain [ Str "A" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "B&1" ] ] [ Plain [ Str "B&1" ] ]
] ]
, Row , Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "C" ] ] [ Plain [ Str "C" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "D" ] ] [ Plain [ Str "D" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -7,8 +7,7 @@ some: code
``` ```
^D ^D
[ BulletList [ BulletList
[ [ Plain [ Str "Item1" ] ], [ Plain [ Str "Item2" ] ] ] [ [ Plain [ Str "Item1" ] ] , [ Plain [ Str "Item2" ] ] ]
, CodeBlock , CodeBlock ( "" , [ "yaml" ] , [] ) "some: code"
( "", [ "yaml" ], [] ) "some: code"
] ]
```` ````

View file

@ -6,18 +6,17 @@ date: '22. Juni 2017'
--- ---
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ fromList
( "date" [ ( "date"
, MetaInlines , MetaInlines
[ Str "22.", Space, Str "Juni", Space, Str "2017" ] [ Str "22." , Space , Str "Juni" , Space , Str "2017" ]
) )
, , ( "title" , MetaInlines [ Str "Titel" ] )
( "title", MetaInlines [ Str "Titel" ] )
] ]
} }
) [] []
``` ```
``` ```
@ -29,23 +28,22 @@ date: |
--- ---
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ fromList
( "date" [ ( "date"
, MetaBlocks , MetaBlocks
[ OrderedList [ OrderedList
( 22, Decimal, Period ) ( 22 , Decimal , Period )
[ [ Plain [ Str "Juni", Space, Str "2017" ] ] ] [ [ Plain [ Str "Juni" , Space , Str "2017" ] ] ]
] ]
) )
, , ( "title"
( "title"
, MetaBlocks , MetaBlocks
[ Div ( "", [], [] ) [ Plain [ Str "foo" ] ] ] [ Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ] ]
) )
] ]
} }
) [] []
``` ```

View file

@ -21,8 +21,7 @@
} }
^D ^D
[ BulletList [ BulletList
[ [ [ Para
[ Para
[ Str "Pandoc" [ Str "Pandoc"
, Space , Space
, Str "is" , Str "is"
@ -34,8 +33,7 @@
] ]
] ]
, BulletList , BulletList
[ [ [ Para
[ Para
[ Str "Pandoc" [ Str "Pandoc"
, Space , Space
, Str "is" , Str "is"

View file

@ -2,5 +2,5 @@
% pandoc -f html -t native % pandoc -f html -t native
<div><p>hello</div> <div><p>hello</div>
^D ^D
[ Div ( "", [], [] ) [ Para [ Str "hello" ] ] ] [ Div ( "" , [] , [] ) [ Para [ Str "hello" ] ] ]
``` ```

View file

@ -3,6 +3,7 @@
\titleformat{\chapter}[display]{\normalfont\large\bfseries}{第\thechapter{}章}{20pt}{\Huge} \titleformat{\chapter}[display]{\normalfont\large\bfseries}{第\thechapter{}章}{20pt}{\Huge}
^D ^D
[ RawBlock [ RawBlock
( Format "tex" ) "\\titleformat{\\chapter}[display]{\\normalfont\\large\\bfseries}{\31532\\thechapter{}\31456}{20pt}{\\Huge}" (Format "tex")
"\\titleformat{\\chapter}[display]{\\normalfont\\large\\bfseries}{\31532\\thechapter{}\31456}{20pt}{\\Huge}"
] ]
``` ```

View file

@ -20,11 +20,9 @@ more
hello \iftoggle{ebook}{ebook}{noebook} hello \iftoggle{ebook}{ebook}{noebook}
^D ^D
[ Para [ Para [ Str "ebook" , SoftBreak , Str "more" ]
[ Str "ebook", SoftBreak, Str "more" ]
, Para , Para
[ Str "not", Space, Str "ebook", SoftBreak, Str "more" ] [ Str "not" , Space , Str "ebook" , SoftBreak , Str "more" ]
, Para , Para [ Str "hello" , Space , Str "noebook" ]
[ Str "hello", Space, Str "noebook" ]
] ]
``` ```

View file

@ -5,15 +5,11 @@
# more # more
^D ^D
[ OrderedList [ OrderedList
( 1, DefaultStyle, DefaultDelim ) ( 1 , DefaultStyle , DefaultDelim )
[ [ [ Plain [ Str "text" , Space , Str "text" ]
[ Plain , CodeBlock ( "" , [] , [] ) "blabla"
[ Str "text", Space, Str "text" ]
, CodeBlock
( "", [], [] ) "blabla"
] ]
, , [ Plain [ Str "more" ] ]
[ Plain [ Str "more" ] ]
] ]
] ]
``` ```

View file

@ -6,9 +6,8 @@
Another Code block Another Code block
^D ^D
[ RawBlock [ RawBlock (Format "tex") "\\newpage"
( Format "tex" ) "\\newpage"
, CodeBlock , CodeBlock
( "", [], [] ) "Code block\n\nAnother Code block" ( "" , [] , [] ) "Code block\n\nAnother Code block"
] ]
``` ```

View file

@ -2,19 +2,19 @@
% pandoc -f latex -t native % pandoc -f latex -t native
\texttt{"hi"} \texttt{"hi"}
^D ^D
[ Para [ Code ( "", [], [] ) "\"hi\"" ] ] [ Para [ Code ( "" , [] , [] ) "\"hi\"" ] ]
``` ```
``` ```
% pandoc -f latex -t native % pandoc -f latex -t native
\texttt{``hi''} \texttt{``hi''}
^D ^D
[ Para [ Code ( "", [], [] ) "\8220hi\8221" ] ] [ Para [ Code ( "" , [] , [] ) "\8220hi\8221" ] ]
``` ```
``` ```
% pandoc -f latex -t native % pandoc -f latex -t native
\texttt{`hi'} \texttt{`hi'}
^D ^D
[ Para [ Code ( "", [], [] ) "\8216hi\8217" ] ] [ Para [ Code ( "" , [] , [] ) "\8216hi\8217" ] ]
``` ```

View file

@ -5,5 +5,5 @@
\code{f} \code{f}
\end{document} \end{document}
^D ^D
[ Para [ Code ( "", [], [] ) "f" ] ] [ Para [ Code ( "" , [] , [] ) "f" ] ]
``` ```

View file

@ -19,10 +19,8 @@
\DeclareRobustCommand{\urlfootnote}{\hyper@normalise\urlfootnote@} \DeclareRobustCommand{\urlfootnote}{\hyper@normalise\urlfootnote@}
\makeatother \makeatother
^D ^D
[ RawBlock [ RawBlock (Format "latex") "\\makeatletter"
( Format "latex" ) "\\makeatletter" , RawBlock (Format "latex") "\\makeatother"
, RawBlock
( Format "latex" ) "\\makeatother"
] ]
``` ```
@ -31,5 +29,5 @@
\def\foo{bar} \def\foo{bar}
\expandafter\bam\foo \expandafter\bam\foo
^D ^D
[ RawBlock ( Format "latex" ) "\\bambar" ] [ RawBlock (Format "latex") "\\bambar" ]
``` ```

View file

@ -7,16 +7,14 @@
[ Span [ Span
( "" ( ""
, [] , []
, , [ ( "title" , "1st line of text <br> 2nd line of text" ) ]
[ ( "title", "1st line of text <br> 2nd line of text" ) ]
) )
[ Str "foo" ] [ Str "foo" ]
, SoftBreak , SoftBreak
, Span , Span
( "" ( ""
, [] , []
, , [ ( "title" , "1st line of text <br> 2nd line of text" ) ]
[ ( "title", "1st line of text <br> 2nd line of text" ) ]
) )
[ Str "foo" ] [ Str "foo" ]
] ]

View file

@ -3,16 +3,19 @@
% Old % Old
^D ^D
Pandoc Pandoc
( Meta { unMeta = fromList [ ( "title", MetaString "New" ) ] } ) [] Meta
{ unMeta = fromList [ ( "title" , MetaString "New" ) ] }
[]
``` ```
``` ```
% pandoc -t native -s -M foo=1 -M foo=2 % pandoc -t native -s -M foo=1 -M foo=2
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ ( "foo", MetaList [ MetaString "1", MetaString "2" ] ) ] fromList
[ ( "foo" , MetaList [ MetaString "1" , MetaString "2" ] ) ]
} }
) [] []
``` ```

View file

@ -6,7 +6,8 @@
} }
^D ^D
[ RawBlock [ RawBlock
( Format "tex" ) "\\parbox[t]{0.4\\textwidth}{\n\\begin{shaded}\n\\end{shaded}\n}" (Format "tex")
"\\parbox[t]{0.4\\textwidth}{\n\\begin{shaded}\n\\end{shaded}\n}"
] ]
``` ```
@ -17,39 +18,40 @@ Blah & Foo & Bar \\
\end{tabular} \end{tabular}
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignLeft , ColWidthDefault )
( AlignLeft, ColWidthDefault ) , ( AlignRight , ColWidthDefault )
, , ( AlignRight , ColWidthDefault )
( AlignRight, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
] ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Blah" ] ] [ Plain [ Str "Blah" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Foo" ] ] [ Plain [ Str "Foo" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Bar" ] ] [ Plain [ Str "Bar" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -12,28 +12,33 @@
</table> </table>
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ ( AlignDefault, ColWidth 0.3 ), ( AlignDefault, ColWidth 0.7 ) ] [ ( AlignDefault , ColWidth 0.3 )
( TableHead ( "", [], [] ) [] ) , ( AlignDefault , ColWidth 0.7 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ] [ Plain [ Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ] [ Plain [ Str "2" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -6,16 +6,21 @@
^D ^D
[ Para [ Para
[ Link [ Link
( "", [], [] ) ( "" , [] , [] )
[ Str "open", Space, Str "productname", Space, Str "bugs" ] [ Str "open"
( "https://domain.com/script.php?a=1&b=2&c=&d=4", "" ) , Space
, Str "productname"
, Space
, Str "bugs"
]
( "https://domain.com/script.php?a=1&b=2&c=&d=4" , "" )
] ]
, Para , Para
[ Str "[" [ Str "["
, Link , Link
( "", [], [] ) ( "" , [] , [] )
[ Str "http://domain.com?a=" ] [ Str "http://domain.com?a=" ]
( "http://domain.com?a=", "" ) ( "http://domain.com?a=" , "" )
, Str "." , Str "."
, Space , Space
, Str "open" , Str "open"

View file

@ -9,51 +9,55 @@ not a caption!
:::::::::::::::: ::::::::::::::::
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "col1" ] ] [ Plain [ Str "col1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "col2" ] ] [ Plain [ Str "col2" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ] [ Plain [ Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ] [ Plain [ Str "2" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
, Div , Div
( "", [ "notes" ], [] ) ( "" , [ "notes" ] , [] )
[ Para [ Str "not", Space, Str "a", Space, Str "caption!" ] ] [ Para
[ Str "not" , Space , Str "a" , Space , Str "caption!" ]
]
] ]
``` ```

View file

@ -20,5 +20,5 @@ Hello.\
World. World.
^D ^D
[ Para [ Str "Hello.\160" ], Para [ Str "World." ] ] [ Para [ Str "Hello.\160" ] , Para [ Str "World." ] ]
``` ```

View file

@ -3,9 +3,7 @@
\newcommand{\gen}{a\ Gen\ b} \newcommand{\gen}{a\ Gen\ b}
abc abc
^D ^D
[ RawBlock [ RawBlock (Format "tex") "\\newcommand{\\gen}{a\\ Gen\\ b}"
( Format "tex" ) "\\newcommand{\\gen}{a\\ Gen\\ b}" , Para [ Str "abc" ]
, Para
[ Str "abc" ]
] ]
``` ```

View file

@ -3,5 +3,5 @@
<div class="line-block">hi<br /><br> <div class="line-block">hi<br /><br>
 there</div>  there</div>
^D ^D
[ LineBlock [ [ Str "hi" ], [], [ Str "\160there" ] ] ] [ LineBlock [ [ Str "hi" ] , [] , [ Str "\160there" ] ] ]
``` ```

View file

@ -18,7 +18,9 @@
</figcaption> </figcaption>
</figure> </figure>
^D ^D
[ Para [ Image ( "", [], [] ) [ Str "baz" ] ( "foo", "fig:" ) ] ] [ Para
[ Image ( "" , [] , [] ) [ Str "baz" ] ( "foo" , "fig:" ) ]
]
``` ```
``` ```
@ -29,6 +31,8 @@
</figure> </figure>
^D ^D
[ Para [ Para
[ Image ( "", [], [] ) [ Emph [ Str "baz" ] ] ( "foo", "fig:" ) ] [ Image
( "" , [] , [] ) [ Emph [ Str "baz" ] ] ( "foo" , "fig:" )
]
] ]
``` ```

View file

@ -5,10 +5,8 @@
#+end_example #+end_example
^D ^D
[ CodeBlock [ CodeBlock
( "" ( "" , [ "example" ] , [] )
, [ "example" ] " This should retain the four leading spaces\n"
, []
) " This should retain the four leading spaces\n"
] ]
``` ```

View file

@ -4,5 +4,7 @@
a a
- b - b
^D ^D
[ BulletList [ [ Plain [ Str "a" ] ], [ Plain [ Str "b" ] ] ] ] [ BulletList
[ [ Plain [ Str "a" ] ] , [ Plain [ Str "b" ] ] ]
]
``` ```

View file

@ -2,5 +2,8 @@
% pandoc -f latex -t native % pandoc -f latex -t native
\foreignlanguage{ngerman}{foo} \foreignlanguage{ngerman}{foo}
^D ^D
[ Para [ Span ( "", [], [ ( "lang", "de-DE" ) ] ) [ Str "foo" ] ] ] [ Para
[ Span ( "" , [] , [ ( "lang" , "de-DE" ) ] ) [ Str "foo" ]
]
]
``` ```

View file

@ -26,26 +26,19 @@ header4
~~~~~~~ ~~~~~~~
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ fromList
( "subtitle", MetaInlines [ Str "Subtitle" ] ) [ ( "subtitle" , MetaInlines [ Str "Subtitle" ] )
, , ( "title" , MetaInlines [ Str "Title" ] )
( "title", MetaInlines [ Str "Title" ] )
] ]
} }
) [ Header 1 ( "header1" , [] , [] ) [ Str "header1" ]
[ Header 1 , Header 2 ( "header2" , [] , [] ) [ Str "header2" ]
( "header1", [], [] ) , Header 3 ( "id" , [] , [] ) [ Str "header3" ]
[ Str "header1" ] , Header
, Header 2 3
( "header2", [], [] ) ( "id3" , [] , [] )
[ Str "header2" ] [ Str "header4" , Span ( "id2" , [] , [] ) [] ]
, Header 3
( "id", [], [] )
[ Str "header3" ]
, Header 3
( "id3", [], [] )
[ Str "header4", Span ( "id2", [], [] ) [] ]
] ]
``` ```

View file

@ -3,5 +3,5 @@
Driver Driver
------ ------
^D ^D
[ Header 1 ( "driver", [], [] ) [ Str "Driver" ] ] [ Header 1 ( "driver" , [] , [] ) [ Str "Driver" ] ]
``` ```

View file

@ -10,15 +10,10 @@
:::: ::::
^D ^D
[ Div [ Div
( "", [ "a" ], [] ) ( "" , [ "a" ] , [] )
[ BulletList [ BulletList
[ [ [ Div ( "" , [ "b" ] , [] ) [ Para [ Str "text" ] ]
[ Div , Div ( "" , [ "c" ] , [] ) [ Para [ Str "text" ] ]
( "", [ "b" ], [] )
[ Para [ Str "text" ] ]
, Div
( "", [ "c" ], [] )
[ Para [ Str "text" ] ]
] ]
] ]
] ]

View file

@ -8,8 +8,12 @@
** Children of headers with excluded tags should not appear :xylophone: ** Children of headers with excluded tags should not appear :xylophone:
* This should not appear :%: * This should not appear :%:
^D ^D
[ Header 1 [ Header
( "noexport-should-appear-if-not-specified-in-excludetags", [], [] ) 1
( "noexport-should-appear-if-not-specified-in-excludetags"
, []
, []
)
[ Str "NOEXPORT" [ Str "NOEXPORT"
, Space , Space
, Str "should" , Str "should"
@ -25,11 +29,10 @@
, Str "in" , Str "in"
, Space , Space
, Str "EXCLUDE" , Str "EXCLUDE"
, Subscript , Subscript [ Str "TAGS" ]
[ Str "TAGS" ]
, Space , Space
, Span , Span
( "", [ "tag" ], [ ( "tag-name", "noexport" ) ] ) ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
[ SmallCaps [ Str "noexport" ] ] [ SmallCaps [ Str "noexport" ] ]
] ]
] ]
@ -41,8 +44,9 @@
* This should not appear :elephant: * This should not appear :elephant:
* This should appear :fawn: * This should appear :fawn:
^D ^D
[ Header 1 [ Header
( "this-should-appear", [], [] ) 1
( "this-should-appear" , [] , [] )
[ Str "This" [ Str "This"
, Space , Space
, Str "should" , Str "should"
@ -50,7 +54,7 @@
, Str "appear" , Str "appear"
, Space , Space
, Span , Span
( "", [ "tag" ], [ ( "tag-name", "fawn" ) ] ) ( "" , [ "tag" ] , [ ( "tag-name" , "fawn" ) ] )
[ SmallCaps [ Str "fawn" ] ] [ SmallCaps [ Str "fawn" ] ]
] ]
] ]
@ -64,8 +68,9 @@
* This should not appear :hippo: * This should not appear :hippo:
* This should appear :noexport: * This should appear :noexport:
^D ^D
[ Header 1 [ Header
( "this-should-appear", [], [] ) 1
( "this-should-appear" , [] , [] )
[ Str "This" [ Str "This"
, Space , Space
, Str "should" , Str "should"
@ -73,7 +78,7 @@
, Str "appear" , Str "appear"
, Space , Space
, Span , Span
( "", [ "tag" ], [ ( "tag-name", "noexport" ) ] ) ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
[ SmallCaps [ Str "noexport" ] ] [ SmallCaps [ Str "noexport" ] ]
] ]
] ]
@ -84,8 +89,12 @@
#+EXCLUDE_TAGS: #+EXCLUDE_TAGS:
* NOEXPORT should appear if not specified in EXCLUDE_TAGS :noexport: * NOEXPORT should appear if not specified in EXCLUDE_TAGS :noexport:
^D ^D
[ Header 1 [ Header
( "noexport-should-appear-if-not-specified-in-excludetags", [], [] ) 1
( "noexport-should-appear-if-not-specified-in-excludetags"
, []
, []
)
[ Str "NOEXPORT" [ Str "NOEXPORT"
, Space , Space
, Str "should" , Str "should"
@ -101,11 +110,10 @@
, Str "in" , Str "in"
, Space , Space
, Str "EXCLUDE" , Str "EXCLUDE"
, Subscript , Subscript [ Str "TAGS" ]
[ Str "TAGS" ]
, Space , Space
, Span , Span
( "", [ "tag" ], [ ( "tag-name", "noexport" ) ] ) ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
[ SmallCaps [ Str "noexport" ] ] [ SmallCaps [ Str "noexport" ] ]
] ]
] ]

View file

@ -15,8 +15,7 @@ The file id is \nolinkurl{ESP_123_5235}.
, Space , Space
, Str "is" , Str "is"
, Space , Space
, Code , Code ( "" , [] , [] ) "ESP_123_5235"
( "", [], [] ) "ESP_123_5235"
, Str "." , Str "."
] ]
] ]

View file

@ -14,7 +14,7 @@
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline ( Format "latex" ) "\\cite{a%\n}" ] [ RawInline (Format "latex") "\\cite{a%\n}" ]
] ]
] ]
``` ```

View file

@ -4,5 +4,5 @@
===== =====
^D ^D
[ BulletList [ [] ], HorizontalRule ] [ BulletList [ [] ] , HorizontalRule ]
``` ```

View file

@ -3,5 +3,7 @@
• a • a
• b • b
^D ^D
[ BulletList [ [ Plain [ Str "a" ] ], [ Plain [ Str "b" ] ] ] ] [ BulletList
[ [ Plain [ Str "a" ] ] , [ Plain [ Str "b" ] ] ]
]
``` ```

View file

@ -9,7 +9,7 @@
% pandoc -f latex+raw_tex -t native % pandoc -f latex+raw_tex -t native
\mbox{abc def} \mbox{abc def}
^D ^D
[ Para [ RawInline ( Format "latex" ) "\\mbox{abc def}" ] ] [ Para [ RawInline (Format "latex") "\\mbox{abc def}" ] ]
``` ```
``` ```
@ -53,7 +53,7 @@ mno} pqr
% pandoc -f latex+raw_tex -t native % pandoc -f latex+raw_tex -t native
\hbox{abc def} \hbox{abc def}
^D ^D
[ Para [ RawInline ( Format "latex" ) "\\hbox{abc def}" ] ] [ Para [ RawInline (Format "latex") "\\hbox{abc def}" ] ]
``` ```
``` ```

View file

@ -3,31 +3,30 @@
|_. heading 1 |_. heading 2| |_. heading 1 |_. heading 2|
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
[ Plain [ Str "heading", Space, Str "1" ] ] (ColSpan 1)
[ Plain [ Str "heading" , Space , Str "1" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
[ Plain [ Str "heading", Space, Str "2" ] ] (ColSpan 1)
[ Plain [ Str "heading" , Space , Str "2" ] ]
] ]
] ])
) [ TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [] ]
[ TableBody ( "", [], [] ) ( RowHeadColumns 0 ) [] [] ] (TableFoot ( "" , [] , [] ) [])
( TableFoot ( "", [], [] ) [] )
] ]
``` ```

View file

@ -2,13 +2,20 @@
% pandoc -f latex -t native % pandoc -f latex -t native
foo \include{command/bar} foo \include{command/bar}
^D ^D
[ Para [ Str "foo" ], Para [ Emph [ Str "hi", Space, Str "there" ] ] ] [ Para [ Str "foo" ]
, Para [ Emph [ Str "hi" , Space , Str "there" ] ]
]
``` ```
``` ```
% pandoc -f latex -t native % pandoc -f latex -t native
foo \input{command/bar} foo \input{command/bar}
^D ^D
[ Para [ Str "foo", Space, Emph [ Str "hi", Space, Str "there" ] ] ] [ Para
[ Str "foo"
, Space
, Emph [ Str "hi" , Space , Str "there" ]
]
]
``` ```

View file

@ -9,48 +9,50 @@
- ham - ham
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ [ ( AlignDefault , ColWidthDefault )
( AlignDefault, ColWidthDefault ) , ( AlignDefault , ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
] ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Foo" ] ] [ Plain [ Str "Foo" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Bar" ] ] [ Plain [ Str "Bar" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "spam" ] ] [ Plain [ Str "spam" ] ]
, Cell , Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "ham" ] ] [ Plain [ Str "ham" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -23,14 +23,11 @@ code4
code5\end{verbatim} code5\end{verbatim}
^D ^D
[ CodeBlock [ CodeBlock
( "", [], [ ( "key1", "value1" ) ] ) "code1\n" ( "" , [] , [ ( "key1" , "value1" ) ] ) "code1\n"
, CodeBlock , CodeBlock
( "", [], [ ( "key2", "value2" ) ] ) "code2\n " ( "" , [] , [ ( "key2" , "value2" ) ] ) "code2\n "
, CodeBlock , CodeBlock ( "" , [] , [] ) "code3"
( "", [], [] ) "code3" , CodeBlock ( "" , [] , [] ) "code4"
, CodeBlock , CodeBlock ( "" , [] , [] ) "code5"
( "", [], [] ) "code4"
, CodeBlock
( "", [], [] ) "code5"
] ]
``` ```

View file

@ -3,7 +3,7 @@
(cf. (cf.
foo) foo)
^D ^D
[ Para [ Str "(cf.", SoftBreak, Str "foo)" ] ] [ Para [ Str "(cf." , SoftBreak , Str "foo)" ] ]
``` ```
``` ```
@ -11,7 +11,9 @@ foo)
a (cf. a (cf.
foo) foo)
^D ^D
[ Para [ Str "a", Space, Str "(cf.", SoftBreak, Str "foo)" ] ] [ Para
[ Str "a" , Space , Str "(cf." , SoftBreak , Str "foo)" ]
]
``` ```
``` ```
@ -19,7 +21,7 @@ foo)
cf. cf.
foo foo
^D ^D
[ Para [ Str "cf.", SoftBreak, Str "foo" ] ] [ Para [ Str "cf." , SoftBreak , Str "foo" ] ]
``` ```
``` ```
@ -27,5 +29,7 @@ foo
a cf. a cf.
foo foo
^D ^D
[ Para [ Str "a", Space, Str "cf.", SoftBreak, Str "foo" ] ] [ Para
[ Str "a" , Space , Str "cf." , SoftBreak , Str "foo" ]
]
``` ```

View file

@ -7,9 +7,8 @@
\end{verbatim} \end{verbatim}
^D ^D
[ Para [ Para
[ Span ( "", [], [] ) [ Code ( "", [], [] ) "<-" ] ] [ Span ( "" , [] , [] ) [ Code ( "" , [] , [] ) "<-" ] ]
, CodeBlock , CodeBlock ( "" , [] , [] ) " while (n > 0) {"
( "", [], [] ) " while (n > 0) {"
] ]
``` ```
@ -24,16 +23,11 @@
\end{itemize} \end{itemize}
^D ^D
[ BulletList [ BulletList
[ [ [ Para [ Str "one" ] ]
[ Para [ Str "one" ] ] , [ Para [ Str "two" ] ]
, , [ Para [ Str "three" ] ]
[ Para [ Str "two" ] ] , [ Para [ Str "four" ] ]
, , [ Para [ Str "five" ] ]
[ Para [ Str "three" ] ]
,
[ Para [ Str "four" ] ]
,
[ Para [ Str "five" ] ]
] ]
] ]
``` ```

View file

@ -13,15 +13,10 @@
^D ^D
[ Div [ Div
( "tree1" ( "tree1"
, , [ "toctree" , "foo" , "bar" ]
[ "toctree", "foo", "bar" ] , [ ( "caption" , "Indice dei contenuti" )
, , ( "numbered" , "" )
[ , ( "maxdepth" , "3" )
( "caption", "Indice dei contenuti" )
,
( "numbered", "" )
,
( "maxdepth", "3" )
] ]
) )
[ Para [ Para

View file

@ -7,22 +7,15 @@
*Level 1 *Level 1
^D ^D
[ BulletList [ BulletList
[ [ [ Plain [ Str "Level" , Space , Str "1" ] ]
[ Plain [ Str "Level", Space, Str "1" ] ] , [ Plain [ Str "Level" , Space , Str "1" ]
,
[ Plain
[ Str "Level", Space, Str "1" ]
, BulletList , BulletList
[ [ [ Plain [ Str "Level" , Space , Str "2" ]
[ Plain , BulletList [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
[ Str "Level", Space, Str "2" ]
, BulletList
[ [ Plain [ Str "Level", Space, Str "3" ] ] ]
] ]
] ]
] ]
, , [ Plain [ Str "Level" , Space , Str "1" ] ]
[ Plain [ Str "Level", Space, Str "1" ] ]
] ]
] ]
``` ```
@ -35,25 +28,19 @@
#Level 1 #Level 1
^D ^D
[ OrderedList [ OrderedList
( 1, DefaultStyle, DefaultDelim ) ( 1 , DefaultStyle , DefaultDelim )
[ [ [ Plain [ Str "Level" , Space , Str "1" ] ]
[ Plain [ Str "Level", Space, Str "1" ] ] , [ Plain [ Str "Level" , Space , Str "1" ]
,
[ Plain
[ Str "Level", Space, Str "1" ]
, OrderedList , OrderedList
( 1, DefaultStyle, DefaultDelim ) ( 1 , DefaultStyle , DefaultDelim )
[ [ [ Plain [ Str "Level" , Space , Str "2" ]
[ Plain
[ Str "Level", Space, Str "2" ]
, OrderedList , OrderedList
( 1, DefaultStyle, DefaultDelim ) ( 1 , DefaultStyle , DefaultDelim )
[ [ Plain [ Str "Level", Space, Str "3" ] ] ] [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
] ]
] ]
] ]
, , [ Plain [ Str "Level" , Space , Str "1" ] ]
[ Plain [ Str "Level", Space, Str "1" ] ]
] ]
] ]
``` ```

View file

@ -26,8 +26,9 @@ so it survives...
% pandoc -f commonmark+gfm_auto_identifiers-ascii_identifiers -t native % pandoc -f commonmark+gfm_auto_identifiers-ascii_identifiers -t native
# non ascii ⚠️ räksmörgås # non ascii ⚠️ räksmörgås
^D ^D
[ Header 1 [ Header
( "non-ascii-\65039-r\228ksm\246rg\229s", [], [] ) 1
( "non-ascii-\65039-r\228ksm\246rg\229s" , [] , [] )
[ Str "non" [ Str "non"
, Space , Space
, Str "ascii" , Str "ascii"
@ -45,8 +46,9 @@ so it survives...
% pandoc -f gfm -t native % pandoc -f gfm -t native
# non ascii ⚠️ räksmörgås # non ascii ⚠️ räksmörgås
^D ^D
[ Header 1 [ Header
( "non-ascii-\65039-r\228ksm\246rg\229s", [], [] ) 1
( "non-ascii-\65039-r\228ksm\246rg\229s" , [] , [] )
[ Str "non" [ Str "non"
, Space , Space
, Str "ascii" , Str "ascii"

View file

@ -7,11 +7,11 @@ My:thumbsup:emoji:heart:
[ Para [ Para
[ Str "My" [ Str "My"
, Span , Span
( "", [ "emoji" ], [ ( "data-emoji", "thumbsup" ) ] ) ( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
[ Str "\128077" ] [ Str "\128077" ]
, Str "emoji" , Str "emoji"
, Span , Span
( "", [ "emoji" ], [ ( "data-emoji", "heart" ) ] ) ( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
[ Str "\10084\65039" ] [ Str "\10084\65039" ]
] ]
] ]
@ -24,11 +24,11 @@ My:thumbsup:emoji:heart:
[ Para [ Para
[ Str "My" [ Str "My"
, Span , Span
( "", [ "emoji" ], [ ( "data-emoji", "thumbsup" ) ] ) ( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
[ Str "\128077" ] [ Str "\128077" ]
, Str "emoji" , Str "emoji"
, Span , Span
( "", [ "emoji" ], [ ( "data-emoji", "heart" ) ] ) ( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
[ Str "\10084\65039" ] [ Str "\10084\65039" ]
] ]
] ]

View file

@ -7,11 +7,17 @@ Markdown parsed *here*
*But not here* *But not here*
^D ^D
[ Para [ Para
[ Str "Markdown", Space, Str "parsed", Space, Emph [ Str "here" ] ] [ Str "Markdown"
, RawBlock , Space
( Format "tex" ) "\\include{command/bar}" , Str "parsed"
, Space
, Emph [ Str "here" ]
]
, RawBlock (Format "tex") "\\include{command/bar}"
, Para , Para
[ Emph [ Str "But", Space, Str "not", Space, Str "here" ] ] [ Emph
[ Str "But" , Space , Str "not" , Space , Str "here" ]
]
] ]
``` ```
@ -22,13 +28,13 @@ Markdown parsed *here*
*But not here* *But not here*
^D ^D
[ Para [ Para
[ Emph [ Emph [ Str "here" ]
[ Str "here" ]
, Space , Space
, RawInline , RawInline (Format "tex") "\\input{command/bar}"
( Format "tex" ) "\\input{command/bar}"
] ]
, Para , Para
[ Emph [ Str "But", Space, Str "not", Space, Str "here" ] ] [ Emph
[ Str "But" , Space , Str "not" , Space , Str "here" ]
]
] ]
``` ```

View file

@ -6,7 +6,7 @@ No blank lines in inline interpreted roles:
blank`:myrole: blank`:myrole:
^D ^D
[ Para [ Str "`no" ], Para [ Str "blank`:myrole:" ] ] [ Para [ Str "`no" ] , Para [ Str "blank`:myrole:" ] ]
``` ```
Backslash escape behaves properly in interpreted roles: Backslash escape behaves properly in interpreted roles:
@ -17,10 +17,8 @@ Backslash escape behaves properly in interpreted roles:
`hi\ there`:code: `hi\ there`:code:
^D ^D
[ Para [ Para [ Superscript [ Str "hithere" ] ]
[ Superscript [ Str "hithere" ] ] , Para [ Code ( "" , [] , [] ) "hi\\ there" ]
, Para
[ Code ( "", [], [] ) "hi\\ there" ]
] ]
``` ```
@ -31,7 +29,8 @@ Backtick followed by alphanumeric doesn't end the span:
^D ^D
[ Para [ Para
[ Code [ Code
( "", [ "interpreted-text" ], [ ( "role", "myrole" ) ] ) "hi`there" ( "" , [ "interpreted-text" ] , [ ( "role" , "myrole" ) ] )
"hi`there"
] ]
] ]
``` ```
@ -44,7 +43,8 @@ there`:myrole:
^D ^D
[ Para [ Para
[ Code [ Code
( "", [ "interpreted-text" ], [ ( "role", "myrole" ) ] ) "hi\nthere" ( "" , [ "interpreted-text" ] , [ ( "role" , "myrole" ) ] )
"hi\nthere"
] ]
] ]
``` ```
@ -54,5 +54,7 @@ Use span for title-reference:
% pandoc -f rst -t native % pandoc -f rst -t native
`default` `default`
^D ^D
[ Para [ Span ( "", [ "title-ref" ], [] ) [ Str "default" ] ] ] [ Para
[ Span ( "" , [ "title-ref" ] , [] ) [ Str "default" ] ]
]
``` ```

View file

@ -6,16 +6,16 @@ foo:
... ...
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ fromList
( "foo" [ ( "foo"
, MetaList , MetaList
[ MetaMap [ MetaMap
( fromList [ ( "bar", MetaInlines [ Str "bam" ] ) ] ) (fromList [ ( "bar" , MetaInlines [ Str "bam" ] ) ])
] ]
) )
] ]
} }
) [] []
``` ```

View file

@ -5,9 +5,10 @@ foo: 42
... ...
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList [ ( "foo", MetaInlines [ Str "42" ] ) ] } { unMeta = fromList [ ( "foo" , MetaInlines [ Str "42" ] ) ]
) [] }
[]
``` ```
``` ```
@ -17,7 +18,7 @@ foo: true
... ...
^D ^D
Pandoc Pandoc
( Meta { unMeta = fromList [ ( "foo", MetaBool True ) ] } ) [] Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
``` ```
``` ```
@ -27,7 +28,7 @@ foo: True
... ...
^D ^D
Pandoc Pandoc
( Meta { unMeta = fromList [ ( "foo", MetaBool True ) ] } ) [] Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
``` ```
``` ```
@ -47,8 +48,9 @@ foo: no
... ...
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList [ ( "foo", MetaInlines [ Str "no" ] ) ] } { unMeta = fromList [ ( "foo" , MetaInlines [ Str "no" ] ) ]
) [] }
[]
``` ```

View file

@ -4,9 +4,9 @@
^D ^D
[ Para [ Para
[ Link [ Link
( "", [], [] ) ( "" , [] , [] )
[ Str "http://example.com/foo%20bar.htm" ] [ Str "http://example.com/foo%20bar.htm" ]
( "http://example.com/foo%20bar.htm", "" ) ( "http://example.com/foo%20bar.htm" , "" )
] ]
] ]
``` ```
@ -17,9 +17,9 @@
^D ^D
[ Para [ Para
[ Link [ Link
( "", [], [] ) ( "" , [] , [] )
[ Str "http://example.com/foo{bar}.htm" ] [ Str "http://example.com/foo{bar}.htm" ]
( "http://example.com/foo{bar}.htm", "" ) ( "http://example.com/foo{bar}.htm" , "" )
] ]
] ]
``` ```
@ -30,9 +30,9 @@
^D ^D
[ Para [ Para
[ Link [ Link
( "", [], [] ) ( "" , [] , [] )
[ Str "Foobar" ] [ Str "Foobar" ]
( "http://example.com/foo%20bar", "" ) ( "http://example.com/foo%20bar" , "" )
] ]
] ]
``` ```

View file

@ -6,9 +6,14 @@ x<a href="/foo"> leading trailing space </a>x
[ Str "x" [ Str "x"
, Space , Space
, Link , Link
( "", [], [] ) ( "" , [] , [] )
[ Str "leading", Space, Str "trailing", Space, Str "space" ] [ Str "leading"
( "/foo", "" ) , Space
, Str "trailing"
, Space
, Str "space"
]
( "/foo" , "" )
, Space , Space
, Str "x" , Str "x"
] ]

View file

@ -10,8 +10,9 @@
\foreignquote{italian}{hi} \foreignquote{italian}{hi}
^D ^D
[ Para [ Para
[ Quoted DoubleQuote [ Quoted
[ Span ( "", [], [ ( "lang", "it" ) ] ) [ Str "hi" ] ] DoubleQuote
[ Span ( "" , [] , [ ( "lang" , "it" ) ] ) [ Str "hi" ] ]
] ]
] ]
``` ```
@ -21,8 +22,9 @@
\hyphenquote*{italian}{hi} \hyphenquote*{italian}{hi}
^D ^D
[ Para [ Para
[ Quoted SingleQuote [ Quoted
[ Span ( "", [], [ ( "lang", "it" ) ] ) [ Str "hi" ] ] SingleQuote
[ Span ( "" , [] , [ ( "lang" , "it" ) ] ) [ Str "hi" ] ]
] ]
] ]
``` ```
@ -33,12 +35,12 @@ Lorem ipsum
\blockquote{dolor sit amet} \blockquote{dolor sit amet}
consectetuer. consectetuer.
^D ^D
[ Para [ Para [ Str "Lorem" , Space , Str "ipsum" ]
[ Str "Lorem", Space, Str "ipsum" ]
, BlockQuote , BlockQuote
[ Para [ Str "dolor", Space, Str "sit", Space, Str "amet" ] ] [ Para
, Para [ Str "dolor" , Space , Str "sit" , Space , Str "amet" ]
[ Str "consectetuer." ] ]
, Para [ Str "consectetuer." ]
] ]
``` ```
@ -78,15 +80,15 @@ Lorem ipsum
\foreignblockquote{italian}{dolor sit amet} \foreignblockquote{italian}{dolor sit amet}
consectetuer. consectetuer.
^D ^D
[ Para [ Para [ Str "Lorem" , Space , Str "ipsum" ]
[ Str "Lorem", Space, Str "ipsum" ]
, BlockQuote , BlockQuote
[ Div [ Div
( "", [], [ ( "lang", "it" ) ] ) ( "" , [] , [ ( "lang" , "it" ) ] )
[ Para [ Str "dolor", Space, Str "sit", Space, Str "amet" ] ] [ Para
[ Str "dolor" , Space , Str "sit" , Space , Str "amet" ]
] ]
, Para ]
[ Str "consectetuer." ] , Para [ Str "consectetuer." ]
] ]
``` ```

View file

@ -11,9 +11,9 @@ This is broken_.
, Str "is" , Str "is"
, Space , Space
, Link , Link
( "", [], [] ) ( "" , [] , [] )
[ Str "broken" ] [ Str "broken" ]
( "http://google.com", "" ) ( "http://google.com" , "" )
, Str "." , Str "."
] ]
] ]

View file

@ -2,7 +2,9 @@
% pandoc -f html -t native % pandoc -f html -t native
My <script type="math/tex">\mathcal{D}</script> My <script type="math/tex">\mathcal{D}</script>
^D ^D
[ Plain [ Str "My", Space, Math InlineMath "\\mathcal{D}" ] ] [ Plain
[ Str "My" , Space , Math InlineMath "\\mathcal{D}" ]
]
``` ```
``` ```

View file

@ -8,8 +8,10 @@
V = \frac{K}{r^2} V = \frac{K}{r^2}
^D ^D
[ Div [ Div
( "tgtmath", [], [] ) ( "tgtmath" , [] , [] )
[ BlockQuote [ Para [ Math DisplayMath "V = \\frac{K}{r^2}" ] ] ] [ BlockQuote
[ Para [ Math DisplayMath "V = \\frac{K}{r^2}" ] ]
]
] ]
``` ```

View file

@ -6,10 +6,8 @@
[ Cite [ Cite
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
[ Str "Multiprenote", Space, Str "23" ] , citationSuffix = [ Str "42" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
@ -18,14 +16,15 @@
{ citationId = "Nie72" { citationId = "Nie72"
, citationPrefix = [] , citationPrefix = []
, citationSuffix = , citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ] [ Str "65" , Str "," , Space , Str "multipostnote" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}" (Format "latex")
"\\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
] ]
] ]
] ]
@ -39,10 +38,8 @@
[ Cite [ Cite
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
[ Str "Multiprenote", Space, Str "23" ] , citationSuffix = [ Str "42" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
@ -50,15 +47,15 @@
, Citation , Citation
{ citationId = "Nie72" { citationId = "Nie72"
, citationPrefix = [] , citationPrefix = []
, citationSuffix = , citationSuffix = [ Str "65" ]
[ Str "65" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}" (Format "latex")
"\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"
] ]
] ]
] ]
@ -72,10 +69,8 @@
[ Cite [ Cite
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix = [ Str "23" ]
[ Str "23" ] , citationSuffix = [ Str "42" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
@ -84,14 +79,15 @@
{ citationId = "Nie72" { citationId = "Nie72"
, citationPrefix = [] , citationPrefix = []
, citationSuffix = , citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ] [ Str "65" , Str "," , Space , Str "multipostnote" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}" (Format "latex")
"\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"
] ]
] ]
] ]
@ -105,10 +101,8 @@
[ Cite [ Cite
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix = [ Str "23" ]
[ Str "23" ] , citationSuffix = [ Str "42" ]
, citationSuffix =
[ Str "42" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
@ -116,15 +110,14 @@
, Citation , Citation
{ citationId = "Nie72" { citationId = "Nie72"
, citationPrefix = [] , citationPrefix = []
, citationSuffix = , citationSuffix = [ Str "65" ]
[ Str "65" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\cites()()[23][42]{Knu86}[65]{Nie72}" (Format "latex") "\\cites()()[23][42]{Knu86}[65]{Nie72}"
] ]
] ]
] ]
@ -171,17 +164,16 @@
[ Cite [ Cite
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix = [ Str "Multiprenote" ]
[ Str "Multiprenote" ] , citationSuffix = [ Str "," , Space , Str "multipostnote" ]
, citationSuffix =
[ Str ",", Space, Str "multipostnote" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\cites(Multiprenote)(multipostnote){Knu86}" (Format "latex")
"\\cites(Multiprenote)(multipostnote){Knu86}"
] ]
] ]
] ]
@ -198,9 +190,8 @@
[ Citation [ Citation
{ citationId = "Knu86" { citationId = "Knu86"
, citationPrefix = , citationPrefix =
[ Str "Multiprenote", Space, Str "23" ] [ Str "Multiprenote" , Space , Str "23" ]
, citationSuffix = , citationSuffix = [ Str "42" ]
[ Str "42" ]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
@ -209,14 +200,19 @@
{ citationId = "Nie72" { citationId = "Nie72"
, citationPrefix = [] , citationPrefix = []
, citationSuffix = , citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ] [ Str "65"
, Str ","
, Space
, Str "multipostnote"
]
, citationMode = NormalCitation , citationMode = NormalCitation
, citationNoteNum = 0 , citationNoteNum = 0
, citationHash = 0 , citationHash = 0
} }
] ]
[ RawInline [ RawInline
( Format "latex" ) "\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}" (Format "latex")
"\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
] ]
, Str "." , Str "."
] ]

View file

@ -2,5 +2,9 @@
% pandoc -f latex -t native % pandoc -f latex -t native
\includegraphics{lalune} \includegraphics{lalune}
^D ^D
[ Para [ Image ( "", [], [] ) [ Str "image" ] ( "lalune.jpg", "" ) ] ] [ Para
[ Image
( "" , [] , [] ) [ Str "image" ] ( "lalune.jpg" , "" )
]
]
``` ```

View file

@ -14,34 +14,36 @@
</table> </table>
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ ( AlignDefault, ColWidthDefault ) ] [ ( AlignDefault , ColWidthDefault ) ]
( TableHead (TableHead
( "", [], [] ) ( "" , [] , [] )
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Name" ] ] [ Plain [ Str "Name" ] ]
] ]
] ])
)
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Accounts" ] ] [ Plain [ Str "Accounts" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -11,23 +11,25 @@
</table> </table>
^D ^D
[ Table [ Table
( "", [], [] ) ( "" , [] , [] )
( Caption Nothing [] ) (Caption Nothing [])
[ ( AlignDefault, ColWidthDefault ) ] [ ( AlignDefault , ColWidthDefault ) ]
( TableHead ( "", [], [] ) [] ) (TableHead ( "" , [] , [] ) [])
[ TableBody [ TableBody
( "", [], [] ) ( "" , [] , [] )
( RowHeadColumns 0 ) [] (RowHeadColumns 0)
[]
[ Row [ Row
( "", [], [] ) ( "" , [] , [] )
[ Cell [ Cell
( "", [], [] ) AlignDefault ( "" , [] , [] )
( RowSpan 1 ) AlignDefault
( ColSpan 1 ) (RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Cell" ] ] [ Plain [ Str "Cell" ] ]
] ]
] ]
] ]
( TableFoot ( "", [], [] ) [] ) (TableFoot ( "" , [] , [] ) [])
] ]
``` ```

View file

@ -23,5 +23,7 @@
% pandoc -t native % pandoc -t native
('asd') ('asd')
^D ^D
[ Para [ Str "(", Quoted SingleQuote [ Str "asd" ], Str ")" ] ] [ Para
[ Str "(" , Quoted SingleQuote [ Str "asd" ] , Str ")" ]
]
``` ```

View file

@ -24,18 +24,16 @@ unsafePerformIO main
^D ^D
[ CodeBlock [ CodeBlock
( "" ( ""
, , [ "commonlisp" , "numberLines" ]
[ "commonlisp", "numberLines" ] , [ ( "org-language" , "lisp" ) , ( "startFrom" , "20" ) ]
, )
[ ( "org-language", "lisp" ), ( "startFrom", "20" ) ] "(+ 1 1)\n"
) "(+ 1 1)\n"
, CodeBlock , CodeBlock
( "" ( ""
, , [ "commonlisp" , "numberLines" , "continuedSourceBlock" ]
[ "commonlisp", "numberLines", "continuedSourceBlock" ] , [ ( "org-language" , "lisp" ) , ( "startFrom" , "10" ) ]
, )
[ ( "org-language", "lisp" ), ( "startFrom", "10" ) ] "(+ 2 2)\n"
) "(+ 2 2)\n"
] ]
``` ```

View file

@ -3,6 +3,7 @@
.. include:: command/5182.txt .. include:: command/5182.txt
^D ^D
[ CodeBlock [ CodeBlock
( "", [ "python", "numberLines" ], [] ) "def func(x):\n return y" ( "" , [ "python" , "numberLines" ] , [] )
"def func(x):\n return y"
] ]
``` ```

View file

@ -8,10 +8,10 @@ abstract: |
... ...
^D ^D
Pandoc Pandoc
( Meta Meta
{ unMeta = fromList { unMeta =
[ fromList
( "abstract" [ ( "abstract"
, MetaBlocks , MetaBlocks
[ Para [ Para
[ Str "This" [ Str "This"
@ -37,5 +37,5 @@ Pandoc
) )
] ]
} }
) [] []
``` ```

View file

@ -8,12 +8,9 @@
- b - b
^D ^D
[ BulletList [ BulletList
[ [ [ Para [ Str "a" ] , Para [ Str "b" ] ]
[ Para [ Str "a" ], Para [ Str "b" ] ] , [ Para [ Str "a" ] ]
, , [ Para [ Str "b" ] ]
[ Para [ Str "a" ] ]
,
[ Para [ Str "b" ] ]
] ]
] ]
``` ```
@ -28,10 +25,8 @@
> foo > foo
^D ^D
[ BulletList [ BulletList
[ [ [ Para [ Str "foo" ] , Para [ Str "foo" ] ]
[ Para [ Str "foo" ], Para [ Str "foo" ] ] , [ Para [ Str "foo" ] , BlockQuote [ Para [ Str "foo" ] ] ]
,
[ Para [ Str "foo" ], BlockQuote [ Para [ Str "foo" ] ] ]
] ]
] ]
``` ```

View file

@ -8,7 +8,9 @@
</fig> </fig>
^D ^D
[ Para [ Para
[ Image ( "fig-1", [], [] ) [ Str "bar" ] ( "foo.png", "fig:" ) ] [ Image
( "fig-1" , [] , [] ) [ Str "bar" ] ( "foo.png" , "fig:" )
]
] ]
``` ```
@ -24,9 +26,9 @@
^D ^D
[ Para [ Para
[ Image [ Image
( "fig-1", [], [] ) ( "fig-1" , [] , [] )
[ Str "foo", LineBreak, Str "bar" ] [ Str "foo" , LineBreak , Str "bar" ]
( "foo.png", "fig:" ) ( "foo.png" , "fig:" )
] ]
] ]
``` ```

View file

@ -9,21 +9,14 @@
::: :::
^D ^D
[ Div [ Div
( "", [ "foo" ], [] ) ( "" , [ "foo" ] , [] )
[ RawBlock [ RawBlock (Format "html") "<table>"
( Format "html" ) "<table>" , RawBlock (Format "html") "<tr>"
, RawBlock , RawBlock (Format "html") "<td>"
( Format "html" ) "<tr>" , Plain [ Str "hi" ]
, RawBlock , RawBlock (Format "html") "</td>"
( Format "html" ) "<td>" , RawBlock (Format "html") "</tr>"
, Plain , RawBlock (Format "html") "</table>"
[ Str "hi" ]
, RawBlock
( Format "html" ) "</td>"
, RawBlock
( Format "html" ) "</tr>"
, RawBlock
( Format "html" ) "</table>"
] ]
] ]
``` ```

View file

@ -13,27 +13,26 @@
Quux. Quux.
^D ^D
[ OrderedList [ OrderedList
( 1, Decimal, Period ) ( 1 , Decimal , Period )
[ [ [ Para [ Str "foo" ]
[ Para
[ Str "foo" ]
, Para , Para
[ Image ( "", [], [] ) [ Str "bar" ] ( "bar.png", "fig:" ) ] [ Image
( "" , [] , [] ) [ Str "bar" ] ( "bar.png" , "fig:" )
] ]
, ]
[ Para , [ Para [ Str "foo2" ]
[ Str "foo2" ]
, Para , Para
[ Image ( "", [], [] ) [ Str "bar2" ] ( "bar2.png", "fig:" ) ] [ Image
( "" , [] , [] ) [ Str "bar2" ] ( "bar2.png" , "fig:" )
] ]
, ]
[ Para , [ Para [ Str "foo3" ]
[ Str "foo3" ]
, Para , Para
[ Image ( "", [], [] ) [ Str "foo3" ] ( "foo3.png", "fig:" ) ] [ Image
( "" , [] , [] ) [ Str "foo3" ] ( "foo3.png" , "fig:" )
] ]
] ]
, Para ]
[ Str "Quux." ] , Para [ Str "Quux." ]
] ]
``` ```

View file

@ -7,8 +7,8 @@ Stay pure!
[ CodeBlock [ CodeBlock
( "" ( ""
, [ "myfunnylanguage" ] , [ "myfunnylanguage" ]
, , [ ( "language" , "myfunnylanguage" ) ]
[ ( "language", "myfunnylanguage" ) ] )
) "Stay pure!" "Stay pure!"
] ]
``` ```

View file

@ -4,5 +4,5 @@
[] []
^D ^D
[ Header 2 ( "section", [], [] ) [], Para [ Str "[]" ] ] [ Header 2 ( "section" , [] , [] ) [] , Para [ Str "[]" ] ]
``` ```

View file

@ -8,7 +8,7 @@
^D ^D
[ Para [ Para
[ Image [ Image
( "test", [], [ ( "width", "1in" ) ] ) ( "test" , [] , [ ( "width" , "1in" ) ] )
[ Str "The" [ Str "The"
, Space , Space
, Str "caption." , Str "caption."
@ -31,7 +31,7 @@
, Space , Space
, Str "{#fig:1}" , Str "{#fig:1}"
] ]
( "img1.jpg", "fig:" ) ( "img1.jpg" , "fig:" )
] ]
] ]
``` ```

Some files were not shown because too many files have changed in this diff Show more