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,
zip-archive >= 0.2.3.4 && < 0.5,
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)
build-depends: basement >= 0.0.10,
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 )
where
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.Definition
import Text.Pandoc.Options (WriterOptions (..))
import Text.Pretty.Simple (pShowOpt, defaultOutputOptionsNoColor,
OutputOptions(..), StringOutputStyle(..))
import Text.Show.Pretty (ppDoc)
import Text.PrettyPrint (renderStyle, Style(..), style, char)
-- | Prettyprint Pandoc document.
writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeNative opts (Pandoc meta blocks) = do
let popts = defaultOutputOptionsNoColor{
outputOptionsIndentAmount = 2,
outputOptionsPageWidth = writerColumns opts,
outputOptionsCompact = True,
outputOptionsCompactParens = False,
outputOptionsStringStyle = Literal }
return $
let style' = style{ lineLength = writerColumns opts,
ribbonsPerLine = 1.2 }
return $ T.pack $ renderStyle style' $
case writerTemplate opts of
Just _ -> TL.toStrict $ pShowOpt popts (Pandoc meta blocks) <> "\n"
Nothing -> TL.toStrict $ pShowOpt popts blocks
Just _ -> ppDoc (Pandoc meta blocks) <> char '\n'
Nothing -> ppDoc blocks

View file

@ -4,7 +4,11 @@
Testing: $\mu\foo\eta$.
^D
[ 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
<bdo dir="ltr">foo</bdo>
^D
[ Plain [ Span ( "", [], [ ( "dir", "ltr" ) ] ) [ Str "foo" ] ] ]
[ Plain
[ Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "foo" ] ]
]
```
```
@ -62,9 +64,7 @@
[ Span
( "" , [] , [ ( "dir" , "rtl" ) ] )
[ Str "foo"
, Span
( "", [], [ ( "dir", "ltr" ) ] )
[ Str "bar" ]
, Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "bar" ]
, Str "baz"
]
]

View file

@ -31,8 +31,7 @@ These are all pretty interesting facts.
[ Div
( "def:tri" , [ "definition" ] , [] )
[ Para
[ Strong
[ Str "Definition", Space, Str "1" ]
[ Strong [ Str "Definition" , Space , Str "1" ]
, Space
, Str "(right-angled"
, Space
@ -41,8 +40,7 @@ These are all pretty interesting facts.
, Space
, Str "A"
, Space
, Emph
[ Str "right-angled", Space, Str "triangle" ]
, Emph [ Str "right-angled" , Space , Str "triangle" ]
, Space
, Str "is"
, Space
@ -85,8 +83,7 @@ These are all pretty interesting facts.
, Div
( "" , [ "lemma" ] , [] )
[ Para
[ Strong
[ Str "Lemma", Space, Str "2" ]
[ Strong [ Str "Lemma" , Space , Str "2" ]
, Str "."
, Space
, Space
@ -119,8 +116,7 @@ These are all pretty interesting facts.
, Div
( "" , [ "proof" ] , [] )
[ Para
[ Emph
[ Str "Proof." ]
[ Emph [ Str "Proof." ]
, Space
, Str "This"
, Space
@ -133,8 +129,9 @@ These are all pretty interesting facts.
, Link
( ""
, []
,
[ ( "reference-type", "ref" ), ( "reference", "def:tri" ) ]
, [ ( "reference-type" , "ref" )
, ( "reference" , "def:tri" )
]
)
[ Str "Definition\160\&1" ]
( "#def:tri" , "" )
@ -149,8 +146,7 @@ These are all pretty interesting facts.
, Div
( "thm:py" , [ "theorem" ] , [] )
[ Para
[ Strong
[ Str "Theorem", Space, Str "3" ]
[ Strong [ Str "Theorem" , Space , Str "3" ]
, Space
, Str "(Pythagorean"
, Space
@ -188,8 +184,7 @@ These are all pretty interesting facts.
, Div
( "" , [ "remark" ] , [] )
[ Para
[ Emph
[ Str "Remark", Space, Str "1" ]
[ Emph [ Str "Remark" , Space , Str "1" ]
, Str "."
, Space
, Space

View file

@ -38,7 +38,14 @@ foo
:::
bar
^D
[ Para [ Str "foo", SoftBreak, Str ":::", SoftBreak, Str "bar" ] ]
[ Para
[ Str "foo"
, SoftBreak
, Str ":::"
, SoftBreak
, Str "bar"
]
]
```
```
@ -60,8 +67,7 @@ And another.
, Space
, Str "paragraph."
]
, Para
[ Str "And", Space, Str "another." ]
, Para [ Str "And" , Space , Str "another." ]
]
]
```

View file

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

View file

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

View file

@ -22,7 +22,8 @@
^D
[ Table
( "" , [] , [] )
( Caption Nothing
(Caption
Nothing
[ Plain
[ Str "Demonstration"
, Space
@ -34,66 +35,69 @@
, Space
, Str "syntax."
]
]
)
[
( AlignRight, ColWidthDefault )
,
( AlignLeft, ColWidthDefault )
,
( AlignCenter, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
])
[ ( AlignRight , ColWidthDefault )
, ( AlignLeft , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [ "header" ] , [] )
[ Cell
( "", [], [] ) AlignRight
( "" , [] , [] )
AlignRight
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Right" ] ]
, Cell
( "", [], [] ) AlignLeft
( "" , [] , [] )
AlignLeft
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Left" ] ]
, Cell
( "", [], [] ) AlignCenter
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Center" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Default" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [ "odd" ] , [] )
[ Cell
( "", [], [] ) AlignRight
( "" , [] , [] )
AlignRight
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignLeft
( "" , [] , [] )
AlignLeft
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignCenter
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
@ -118,38 +122,39 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignRight, ColWidthDefault )
,
( AlignLeft, ColWidthDefault )
,
( AlignCenter, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
[ ( AlignRight , ColWidthDefault )
, ( AlignLeft , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
, ( AlignRight , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [ "odd" ] , [] )
[ Cell
( "", [], [] ) AlignRight
( "" , [] , [] )
AlignRight
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignLeft
( "" , [] , [] )
AlignLeft
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignCenter
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]
, Cell
( "", [], [] ) AlignRight
( "" , [] , [] )
AlignRight
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "12" ] ]

View file

@ -4,7 +4,9 @@
\section{A section}\label{foo}
}
^D
[ Header 1 ( "foo", [], [] ) [ Str "A", Space, Str "section" ] ]
[ Header
1 ( "foo" , [] , [] ) [ Str "A" , Space , Str "section" ]
]
```
```
@ -15,7 +17,9 @@
^D
[ Div
( "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
Bar \hypertarget{foo}{Foo}
^D
[ Para [ Str "Bar", Space, Span ( "foo", [], [] ) [ Str "Foo" ] ] ]
[ Para
[ Str "Bar"
, Space
, Span ( "foo" , [] , [] ) [ Str "Foo" ]
]
]
```
```
@ -34,6 +43,8 @@ bar
\end{verbatim}
}
^D
[ Div ( "foo", [], [] ) [ CodeBlock ( "", [], [] ) "bar" ] ]
[ Div
( "foo" , [] , [] ) [ CodeBlock ( "" , [] , [] ) "bar" ]
]
```

View file

@ -9,7 +9,10 @@ E&=&F
\end{eqnarray}
^D
[ 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" ; ?>
^D
[ Para
[ Str "a", RawInline ( Format "html" ) "<?php echo \"1\" ; ?>" ]
[ Str "a"
, RawInline (Format "html") "<?php echo \"1\" ; ?>"
]
]
```

View file

@ -10,24 +10,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignRight, ColWidth 8.333333333333333 e- 2 )
,
( AlignLeft, ColWidth 0.6805555555555556 )
[ ( AlignRight , ColWidth 8.333333333333333e-2 )
, ( AlignLeft , ColWidth 0.6805555555555556 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "foo" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "bar" ] ]
@ -35,12 +36,14 @@
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "foo" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain

View file

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

View file

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

View file

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

View file

@ -27,24 +27,25 @@ on Windows builds.
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignDefault, ColWidth 5.555555555555555 e- 2 )
,
( AlignDefault, ColWidth 5.555555555555555 e- 2 )
[ ( AlignDefault , ColWidth 5.555555555555555e-2 )
, ( AlignDefault , ColWidth 5.555555555555555e-2 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
@ -52,13 +53,9 @@ on Windows builds.
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( RowSpan 1 )
( ColSpan 1 ) []
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "", [], [] ) AlignDefault
( RowSpan 1 )
( ColSpan 1 ) []
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
]
]
]

View file

@ -3,7 +3,8 @@
\subfile{command/sub-file-chapter-1}
\subfile{command/sub-file-chapter-2}
^D
[ Header 1
[ Header
1
( "chapter-1" , [] , [] )
[ Str "Chapter" , Space , Str "1" ]
, Para
@ -25,7 +26,8 @@
, Space
, Str "file."
]
, Header 1
, Header
1
( "chapter-2" , [] , [] )
[ Str "Chapter" , Space , Str "2" ]
, Para

View file

@ -8,70 +8,83 @@
[ Table
( "" , [] , [] )
(Caption Nothing [ Plain [ Str "Test" ] ])
[
( AlignDefault, ColWidth 0.4 )
,
( AlignDefault, ColWidth 0.2 )
,
( AlignDefault, ColWidth 0.4 )
[ ( AlignDefault , ColWidth 0.4 )
, ( AlignDefault , ColWidth 0.2 )
, ( AlignDefault , ColWidth 0.4 )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Flavor" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Price" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Slogan" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Albatross" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2.99" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "On", Space, Str "a", Space, Str "stick!" ] ]
[ Plain
[ Str "On"
, Space
, Str "a"
, Space
, Str "stick!"
]
]
]
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Crunchy" , Space , Str "Frog" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1.49" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain
@ -123,51 +136,51 @@
[ Table
( "" , [] , [] )
(Caption Nothing [ Plain [ Str "Test" ] ])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( RowSpan 1 )
( ColSpan 1 ) []
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "a" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "b" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "cat's" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "4" ] ]
@ -175,17 +188,20 @@
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "dog's" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ]
@ -206,24 +222,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [ Plain [ Str "Test" ] ])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\"" ] ]

View file

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

View file

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

View file

@ -6,11 +6,8 @@ hello
\endmulti
^D
[ RawBlock
( Format "tex" ) "\\multi"
, Para
[ Str "hello" ]
, RawBlock
( Format "tex" ) "\\endmulti"
[ RawBlock (Format "tex") "\\multi"
, Para [ 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>
^D
[ Para
[ Quoted DoubleQuote [ Str "Hello" ] ]
[ Para [ Quoted DoubleQuote [ Str "Hello" ] ]
, Para
[ Str "Same"
, 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"
, Space
, 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

@ -110,11 +110,9 @@
^D
[ Para
[ Str "10\160m"
, Superscript
[ Str "2" ]
, Superscript [ Str "2" ]
, Str "\8211\&20\160m"
, Superscript
[ Str "2" ]
, Superscript [ Str "2" ]
]
]
```
@ -140,11 +138,9 @@
^D
[ Para
[ Str "10\160m"
, Superscript
[ Str "4" ]
, Superscript [ Str "4" ]
, Str "\8211\&20\160m"
, Superscript
[ Str "4" ]
, Superscript [ Str "4" ]
]
]
```
@ -156,11 +152,9 @@
^D
[ Para
[ Str "10\160m"
, Superscript
[ Str "2" ]
, Superscript [ Str "2" ]
, Str "\8211\&20\160m"
, Superscript
[ Str "2" ]
, Superscript [ Str "2" ]
]
]
```
@ -186,11 +180,9 @@
^D
[ Para
[ Str "10\160m"
, Superscript
[ Str "4" ]
, Superscript [ Str "4" ]
, Str "\8211\&20\160m"
, Superscript
[ Str "4" ]
, Superscript [ Str "4" ]
]
]
```

View file

@ -20,40 +20,42 @@ Results marker can be hidden in block attributes (#3706)
[ Table
( "" , [] , [] )
(Caption Nothing [ Plain [ Str "Lalelu." ] ])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Id" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Desc" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ]
@ -61,12 +63,14 @@ Results marker can be hidden in block attributes (#3706)
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ]
@ -74,12 +78,14 @@ Results marker can be hidden in block attributes (#3706)
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "3" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "La" ] ]

View file

@ -8,20 +8,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignCenter, ColWidthDefault ), ( AlignCenter, ColWidthDefault ) ]
[ ( AlignCenter , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "A" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "B&1" ] ]
@ -29,12 +34,14 @@
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "C" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "D" ] ]

View file

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

View file

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

View file

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

View file

@ -3,6 +3,7 @@
\titleformat{\chapter}[display]{\normalfont\large\bfseries}{第\thechapter{}章}{20pt}{\Huge}
^D
[ 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}
^D
[ Para
[ Str "ebook", SoftBreak, Str "more" ]
[ Para [ Str "ebook" , SoftBreak , Str "more" ]
, Para
[ Str "not" , Space , Str "ebook" , SoftBreak , Str "more" ]
, Para
[ Str "hello", Space, Str "noebook" ]
, Para [ Str "hello" , Space , Str "noebook" ]
]
```

View file

@ -6,14 +6,10 @@
^D
[ OrderedList
( 1 , DefaultStyle , DefaultDelim )
[
[ Plain
[ Str "text", Space, Str "text" ]
, CodeBlock
( "", [], [] ) "blabla"
[ [ Plain [ Str "text" , Space , Str "text" ]
, CodeBlock ( "" , [] , [] ) "blabla"
]
,
[ Plain [ Str "more" ] ]
, [ Plain [ Str "more" ] ]
]
]
```

View file

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

View file

@ -19,10 +19,8 @@
\DeclareRobustCommand{\urlfootnote}{\hyper@normalise\urlfootnote@}
\makeatother
^D
[ RawBlock
( Format "latex" ) "\\makeatletter"
, RawBlock
( Format "latex" ) "\\makeatother"
[ RawBlock (Format "latex") "\\makeatletter"
, RawBlock (Format "latex") "\\makeatother"
]
```

View file

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

View file

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

View file

@ -6,7 +6,8 @@
}
^D
[ 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}"
]
```
@ -19,31 +20,32 @@ Blah & Foo & Bar \\
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignLeft, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
[ ( AlignLeft , ColWidthDefault )
, ( AlignRight , ColWidthDefault )
, ( AlignRight , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Blah" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Foo" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Bar" ] ]

View file

@ -14,20 +14,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault, ColWidth 0.3 ), ( AlignDefault, ColWidth 0.7 ) ]
[ ( AlignDefault , ColWidth 0.3 )
, ( AlignDefault , ColWidth 0.7 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]

View file

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

View file

@ -11,40 +11,42 @@ not a caption!
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "col1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "col2" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "2" ] ]
@ -54,6 +56,8 @@ not a caption!
(TableFoot ( "" , [] , [] ) [])
, Div
( "" , [ "notes" ] , [] )
[ Para [ Str "not", Space, Str "a", Space, Str "caption!" ] ]
[ Para
[ Str "not" , Space , Str "a" , Space , Str "caption!" ]
]
]
```

View file

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

View file

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

View file

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

View file

@ -4,5 +4,7 @@
a
- b
^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
\foreignlanguage{ngerman}{foo}
^D
[ Para [ Span ( "", [], [ ( "lang", "de-DE" ) ] ) [ Str "foo" ] ] ]
[ Para
[ Span ( "" , [] , [ ( "lang" , "de-DE" ) ] ) [ Str "foo" ]
]
]
```

View file

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

View file

@ -12,13 +12,8 @@
[ Div
( "" , [ "a" ] , [] )
[ BulletList
[
[ Div
( "", [ "b" ], [] )
[ Para [ Str "text" ] ]
, Div
( "", [ "c" ], [] )
[ Para [ Str "text" ] ]
[ [ Div ( "" , [ "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:
* This should not appear :%:
^D
[ Header 1
( "noexport-should-appear-if-not-specified-in-excludetags", [], [] )
[ Header
1
( "noexport-should-appear-if-not-specified-in-excludetags"
, []
, []
)
[ Str "NOEXPORT"
, Space
, Str "should"
@ -25,8 +29,7 @@
, Str "in"
, Space
, Str "EXCLUDE"
, Subscript
[ Str "TAGS" ]
, Subscript [ Str "TAGS" ]
, Space
, Span
( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
@ -41,7 +44,8 @@
* This should not appear :elephant:
* This should appear :fawn:
^D
[ Header 1
[ Header
1
( "this-should-appear" , [] , [] )
[ Str "This"
, Space
@ -64,7 +68,8 @@
* This should not appear :hippo:
* This should appear :noexport:
^D
[ Header 1
[ Header
1
( "this-should-appear" , [] , [] )
[ Str "This"
, Space
@ -84,8 +89,12 @@
#+EXCLUDE_TAGS:
* NOEXPORT should appear if not specified in EXCLUDE_TAGS :noexport:
^D
[ Header 1
( "noexport-should-appear-if-not-specified-in-excludetags", [], [] )
[ Header
1
( "noexport-should-appear-if-not-specified-in-excludetags"
, []
, []
)
[ Str "NOEXPORT"
, Space
, Str "should"
@ -101,8 +110,7 @@
, Str "in"
, Space
, Str "EXCLUDE"
, Subscript
[ Str "TAGS" ]
, Subscript [ Str "TAGS" ]
, Space
, Span
( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )

View file

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

View file

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

View file

@ -5,28 +5,27 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "heading" , Space , Str "1" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "heading" , Space , Str "2" ] ]
]
]
)
])
[ TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [] ]
(TableFoot ( "" , [] , [] ) [])
]

View file

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

View file

@ -11,40 +11,42 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignDefault, ColWidthDefault )
,
( AlignDefault, ColWidthDefault )
[ ( AlignDefault , ColWidthDefault )
, ( AlignDefault , ColWidthDefault )
]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Foo" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Bar" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "spam" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "ham" ] ]

View file

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

View file

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

View file

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

View file

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

View file

@ -7,22 +7,15 @@
*Level 1
^D
[ 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
[
[ Plain
[ Str "Level", Space, Str "2" ]
, BulletList
[ [ Plain [ Str "Level", Space, Str "3" ] ] ]
[ [ Plain [ Str "Level" , Space , Str "2" ]
, BulletList [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
]
]
]
,
[ Plain [ Str "Level", Space, Str "1" ] ]
, [ Plain [ Str "Level" , Space , Str "1" ] ]
]
]
```
@ -36,24 +29,18 @@
^D
[ OrderedList
( 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
( 1 , DefaultStyle , DefaultDelim )
[
[ Plain
[ Str "Level", Space, Str "2" ]
[ [ Plain [ Str "Level" , Space , Str "2" ]
, OrderedList
( 1 , DefaultStyle , DefaultDelim )
[ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
]
]
]
,
[ Plain [ Str "Level", Space, Str "1" ] ]
, [ Plain [ Str "Level" , Space , Str "1" ] ]
]
]
```

View file

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

View file

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

View file

@ -17,10 +17,8 @@ Backslash escape behaves properly in interpreted roles:
`hi\ there`:code:
^D
[ Para
[ Superscript [ Str "hithere" ] ]
, Para
[ Code ( "", [], [] ) "hi\\ there" ]
[ Para [ Superscript [ Str "hithere" ] ]
, Para [ Code ( "" , [] , [] ) "hi\\ there" ]
]
```
@ -31,7 +29,8 @@ Backtick followed by alphanumeric doesn't end the span:
^D
[ Para
[ Code
( "", [ "interpreted-text" ], [ ( "role", "myrole" ) ] ) "hi`there"
( "" , [ "interpreted-text" ] , [ ( "role" , "myrole" ) ] )
"hi`there"
]
]
```
@ -44,7 +43,8 @@ there`:myrole:
^D
[ Para
[ 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
`default`
^D
[ Para [ Span ( "", [ "title-ref" ], [] ) [ Str "default" ] ] ]
[ Para
[ Span ( "" , [ "title-ref" ] , [] ) [ Str "default" ] ]
]
```

View file

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

View file

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

View file

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

View file

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

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

View file

@ -9,7 +9,9 @@
^D
[ Div
( "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
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote", Space, Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
, citationSuffix = [ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -25,7 +23,8 @@
}
]
[ 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
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote", Space, Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
, citationSuffix = [ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -50,15 +47,15 @@
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65" ]
, citationSuffix = [ Str "65" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"
(Format "latex")
"\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"
]
]
]
@ -72,10 +69,8 @@
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationPrefix = [ Str "23" ]
, citationSuffix = [ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -91,7 +86,8 @@
}
]
[ RawInline
( Format "latex" ) "\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"
(Format "latex")
"\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
]
]
@ -105,10 +101,8 @@
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationPrefix = [ Str "23" ]
, citationSuffix = [ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -116,8 +110,7 @@
, Citation
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65" ]
, citationSuffix = [ Str "65" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -171,17 +164,16 @@
[ Cite
[ Citation
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote" ]
, citationSuffix =
[ Str ",", Space, Str "multipostnote" ]
, citationPrefix = [ Str "Multiprenote" ]
, citationSuffix = [ Str "," , Space , Str "multipostnote" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\cites(Multiprenote)(multipostnote){Knu86}"
(Format "latex")
"\\cites(Multiprenote)(multipostnote){Knu86}"
]
]
]
@ -199,8 +191,7 @@
{ citationId = "Knu86"
, citationPrefix =
[ Str "Multiprenote" , Space , Str "23" ]
, citationSuffix =
[ Str "42" ]
, citationSuffix = [ Str "42" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
@ -209,14 +200,19 @@
{ citationId = "Nie72"
, citationPrefix = []
, citationSuffix =
[ Str "65", Str ",", Space, Str "multipostnote" ]
[ Str "65"
, Str ","
, Space
, Str "multipostnote"
]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ RawInline
( Format "latex" ) "\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
(Format "latex")
"\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
]
, Str "."
]

View file

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

View file

@ -22,20 +22,22 @@
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Name" ] ]
]
]
)
])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Accounts" ] ]

View file

@ -17,11 +17,13 @@
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Cell" ] ]

View file

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

View file

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

View file

@ -3,6 +3,7 @@
.. include:: command/5182.txt
^D
[ 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
Pandoc
( Meta
{ unMeta = fromList
[
( "abstract"
Meta
{ unMeta =
fromList
[ ( "abstract"
, MetaBlocks
[ Para
[ Str "This"
@ -37,5 +37,5 @@ Pandoc
)
]
}
) []
[]
```

View file

@ -8,12 +8,9 @@
- b
^D
[ 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
^D
[ BulletList
[
[ Para [ Str "foo" ], Para [ Str "foo" ] ]
,
[ Para [ Str "foo" ], BlockQuote [ Para [ Str "foo" ] ] ]
[ [ Para [ Str "foo" ] , Para [ Str "foo" ] ]
, [ Para [ Str "foo" ] , BlockQuote [ Para [ Str "foo" ] ] ]
]
]
```

View file

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

View file

@ -10,20 +10,13 @@
^D
[ Div
( "" , [ "foo" ] , [] )
[ RawBlock
( Format "html" ) "<table>"
, RawBlock
( Format "html" ) "<tr>"
, RawBlock
( Format "html" ) "<td>"
, Plain
[ Str "hi" ]
, RawBlock
( Format "html" ) "</td>"
, RawBlock
( Format "html" ) "</tr>"
, RawBlock
( Format "html" ) "</table>"
[ RawBlock (Format "html") "<table>"
, RawBlock (Format "html") "<tr>"
, RawBlock (Format "html") "<td>"
, Plain [ Str "hi" ]
, RawBlock (Format "html") "</td>"
, RawBlock (Format "html") "</tr>"
, RawBlock (Format "html") "</table>"
]
]
```

View file

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

View file

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

View file

@ -2,10 +2,10 @@
% pandoc -t native -s --metadata-file command/5700-metadata-file-1.yml --metadata-file command/5700-metadata-file-2.yml
^D
Pandoc
( Meta
{ unMeta = fromList
[
( "desc"
Meta
{ unMeta =
fromList
[ ( "desc"
, MetaInlines
[ Str "Both"
, Space
@ -22,8 +22,7 @@ Pandoc
, Str "loaded."
]
)
,
( "title"
, ( "title"
, MetaInlines
[ Str "Multiple"
, Space
@ -36,5 +35,5 @@ Pandoc
)
]
}
) []
[]
```

View file

@ -7,24 +7,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[
( AlignDefault, ColWidth 0.125 )
,
( AlignDefault, ColWidth 0.2361111111111111 )
[ ( AlignDefault , ColWidth 0.125 )
, ( AlignDefault , ColWidth 0.2361111111111111 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "123456" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Math InlineMath "a + b" ] ]

View file

@ -14,11 +14,13 @@
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "d" , LineBreak , Str "e" ] ]

View file

@ -6,15 +6,11 @@ b_
# hi _c
c
^D
[ Header 1
( "hi-_a", [], [] )
[ Str "hi", Space, Str "_a" ]
, Para
[ Str "b_" ]
, Header 1
( "hi-_c", [], [] )
[ Str "hi", Space, Str "_c" ]
, Para
[ Str "c" ]
[ Header
1 ( "hi-_a" , [] , [] ) [ Str "hi" , Space , Str "_a" ]
, Para [ Str "b_" ]
, Header
1 ( "hi-_c" , [] , [] ) [ Str "hi" , Space , Str "_c" ]
, Para [ Str "c" ]
]
```

View file

@ -11,8 +11,9 @@
end
^D
[ Para
[ Math DisplayMath "q_3\n+ 4", Math DisplayMath "- 5 +\nq_5" ]
, Para
[ Str "end" ]
[ Math DisplayMath "q_3\n+ 4"
, Math DisplayMath "- 5 +\nq_5"
]
, Para [ Str "end" ]
]
```

View file

@ -13,18 +13,13 @@ Hello World
^D
[ Para
[ Str "\\newcommand{"
, RawInline
( Format "tex" ) "\\highlight"
, RawInline (Format "tex") "\\highlight"
, Str "}[1]{\\colorbox{yellow}{\\parbox{"
, RawInline
( Format "tex" ) "\\dimexpr"
, RawInline
( Format "tex" ) "\\linewidth-2"
, RawInline
( Format "tex" ) "\\fboxsep"
, RawInline (Format "tex") "\\dimexpr"
, RawInline (Format "tex") "\\linewidth-2"
, RawInline (Format "tex") "\\fboxsep"
, Str "}{#1}}"
]
, Para
[ Str "Hello", Space, Str "World" ]
, Para [ Str "Hello" , Space , Str "World" ]
]
```

View file

@ -5,13 +5,11 @@ Synésius^[]
^D
[ Para
[ Str "Zozime"
, Note
[ Para [] ]
, Note [ Para [] ]
, Str ","
, SoftBreak
, Str "Syn\233sius"
, Note
[ Para [] ]
, Note [ Para [] ]
]
]
```

View file

@ -9,17 +9,11 @@ x
y
^D
[ RawBlock
( Format "html" ) "<tr>"
, RawBlock
( Format "html" ) "<td>"
, RawBlock
( Format "html" ) "</td>"
, RawBlock
( Format "html" ) "</tr>"
, Para
[ Str "x" ]
, CodeBlock
( "", [], [] ) "y"
[ RawBlock (Format "html") "<tr>"
, RawBlock (Format "html") "<td>"
, RawBlock (Format "html") "</td>"
, RawBlock (Format "html") "</tr>"
, Para [ Str "x" ]
, CodeBlock ( "" , [] , [] ) "y"
]
```

View file

@ -8,6 +8,7 @@
\end{figure*}
^D
[ RawBlock
( Format "latex" ) "\\begin{figure*}\n \\centering\n \\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}\n\\end{figure*}"
(Format "latex")
"\\begin{figure*}\n \\centering\n \\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}\n\\end{figure*}"
]
```

View file

@ -27,8 +27,9 @@ This reference to Figure \ref{fig:label} works fine.
, Link
( ""
, []
,
[ ( "reference-type", "ref" ), ( "reference", "tbl:label" ) ]
, [ ( "reference-type" , "ref" )
, ( "reference" , "tbl:label" )
]
)
[ Str "1" ]
( "#tbl:label" , "" )
@ -41,7 +42,8 @@ This reference to Figure \ref{fig:label} works fine.
( "tbl:label" , [] , [] )
[ Table
( "" , [] , [] )
( Caption Nothing
(Caption
Nothing
[ Plain
[ Str "This"
, Space
@ -53,33 +55,33 @@ This reference to Figure \ref{fig:label} works fine.
, Space
, Str "number."
]
]
)
[
( AlignLeft, ColWidthDefault )
,
( AlignCenter, ColWidthDefault )
,
( AlignRight, ColWidthDefault )
])
[ ( AlignLeft , ColWidthDefault )
, ( AlignCenter , ColWidthDefault )
, ( AlignRight , ColWidthDefault )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
@ -87,17 +89,20 @@ This reference to Figure \ref{fig:label} works fine.
, Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
, Cell
( "", [], [] ) AlignDefault
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "\8212\8212\8211" ] ]
@ -118,8 +123,9 @@ This reference to Figure \ref{fig:label} works fine.
, Link
( ""
, []
,
[ ( "reference-type", "ref" ), ( "reference", "fig:label" ) ]
, [ ( "reference-type" , "ref" )
, ( "reference" , "fig:label" )
]
)
[ Str "1" ]
( "#fig:label" , "" )

View file

@ -4,5 +4,7 @@
<label>I</label><title>Introduction</title>
</sec>
^D
[ Header 1 ( "", [], [] ) [ Str "I.", Space, Str "Introduction" ] ]
[ Header
1 ( "" , [] , [] ) [ Str "I." , Space , Str "Introduction" ]
]
```

View file

@ -13,13 +13,14 @@ Me
\end{document}
^D
Pandoc
( Meta
{ unMeta = fromList
[
( "author", MetaList [ MetaInlines [ Str "Me" ] ] )
,
( "title", MetaInlines [ Str "Document", Space, Str "title" ] )
Meta
{ unMeta =
fromList
[ ( "author" , MetaList [ MetaInlines [ Str "Me" ] ] )
, ( "title"
, MetaInlines [ Str "Document" , Space , Str "title" ]
)
]
}
) []
[]
```

View file

@ -7,11 +7,9 @@ title
text
^D
[ Header 1
( "title", [ "allowframebreaks" ], [] )
[ Str "title" ]
, Para
[ Str "text" ]
[ Header
1 ( "title" , [ "allowframebreaks" ] , [] ) [ Str "title" ]
, Para [ Str "text" ]
]
```

View file

@ -7,5 +7,7 @@ if true; then
fi
```
^D
[ CodeBlock ( "", [], [] ) "if true; then\n echo \"yup\"\nfi" ]
[ CodeBlock
( "" , [] , [] ) "if true; then\n echo \"yup\"\nfi"
]
````

View file

@ -17,20 +17,25 @@
[ Table
( "" , [] , [] )
(Caption Nothing [])
[ ( AlignDefault, ColWidth 0.25 ), ( AlignDefault, ColWidth 0.25 ) ]
[ ( AlignDefault , ColWidth 0.25 )
, ( AlignDefault , ColWidth 0.25 )
]
(TableHead ( "" , [] , [] ) [])
[ TableBody
( "" , [] , [] )
( RowHeadColumns 0 ) []
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "", [], [] ) AlignCenter
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Para [ Str "2" ] ]
, Cell
( "", [], [] ) AlignCenter
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Para [ Str "1" ] ]

View file

@ -2,6 +2,7 @@
% pandoc -f latex -t native
\blockquote[test][]{quote}
^D
[ BlockQuote [ Para [ Str "quote" ], Para [ Str "test" ] ] ]
[ BlockQuote [ Para [ Str "quote" ] , Para [ Str "test" ] ]
]
```

View file

@ -21,10 +21,8 @@ See @foo.
]
[ Str "[@buchanan]" ]
]
, OrderedList
( 1, Example, TwoParens ) [ [] ]
, Para
[ Str "See", Space, Str "1." ]
, OrderedList ( 1 , Example , TwoParens ) [ [] ]
, Para [ Str "See" , Space , Str "1." ]
, Para
[ Cite
[ Citation

View file

@ -7,8 +7,7 @@
[ Citation
{ citationId = "key"
, citationPrefix = []
, citationSuffix =
[ Str "\8222Aber\8220" ]
, citationSuffix = [ Str "\8222Aber\8220" ]
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0

View file

@ -12,9 +12,7 @@
[ Str "\8222Etwas"
, Space
, Str "[\8230"
, Span
( "", [], [] )
[ Str "]" ]
, Span ( "" , [] , [] ) [ Str "]" ]
, Space
, Str "auslassen\8220"
]
@ -24,14 +22,11 @@
}
]
[ Str "("
, Strong
[ Str "key?" ]
, Strong [ Str "key?" ]
, Str "\8222Etwas"
, Space
, Str "[\8230"
, Span
( "", [], [] )
[ Str "]" ]
, Span ( "" , [] , [] ) [ Str "]" ]
, Space
, Str "auslassen\8220)"
]

View file

@ -79,7 +79,10 @@ Some text.[^1]
]
]
, Div
( "refs", [ "references", "csl-bib-body", "hanging-indent" ], [] )
( "refs"
, [ "references" , "csl-bib-body" , "hanging-indent" ]
, []
)
[ Div
( "ref-fruchtel-sozialer-2013a" , [ "csl-entry" ] , [] )
[ Para

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