2017-08-08 22:17:29 +02:00
|
|
|
gfm tests:
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
| Fruit | Price |
|
|
|
|
| ----- | ----: |
|
|
|
|
| apple | 0.13 |
|
|
|
|
| orange|1.12|
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Table
|
|
|
|
( "", [], [] )
|
|
|
|
( Caption Nothing [] )
|
|
|
|
[ ( AlignDefault, ColWidthDefault ), ( AlignRight, ColWidthDefault ) ]
|
|
|
|
( TableHead
|
|
|
|
( "", [], [] )
|
|
|
|
[ Row
|
|
|
|
( "", [], [] )
|
|
|
|
[ Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "Fruit" ] ]
|
|
|
|
, Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "Price" ] ]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
)
|
|
|
|
[ TableBody
|
|
|
|
( "", [], [] )
|
|
|
|
( RowHeadColumns 0 ) []
|
|
|
|
[ Row
|
|
|
|
( "", [], [] )
|
|
|
|
[ Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "apple" ] ]
|
|
|
|
, Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "0.13" ] ]
|
|
|
|
]
|
|
|
|
, Row
|
|
|
|
( "", [], [] )
|
|
|
|
[ Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "orange" ] ]
|
|
|
|
, Cell
|
|
|
|
( "", [], [] ) AlignDefault
|
|
|
|
( RowSpan 1 )
|
|
|
|
( ColSpan 1 )
|
|
|
|
[ Plain [ Str "1.12" ] ]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
( TableFoot ( "", [], [] ) [] )
|
|
|
|
]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
~~stricken out~~
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Strikeout [ Str "stricken", Space, Str "out" ] ] ]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
# Header
|
|
|
|
## Header
|
|
|
|
# -foo-bar_baz
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Header 1
|
|
|
|
( "header", [], [] )
|
|
|
|
[ Str "Header" ]
|
|
|
|
, Header 2
|
|
|
|
( "header-1", [], [] )
|
|
|
|
[ Str "Header" ]
|
|
|
|
, Header 1
|
|
|
|
( "-foo-bar_baz", [], [] )
|
|
|
|
[ Str "-foo-bar_baz" ]
|
|
|
|
]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
My:thumbsup:emoji:heart:
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
|
|
|
[ Str "My"
|
|
|
|
, Span
|
|
|
|
( "", [ "emoji" ], [ ( "data-emoji", "thumbsup" ) ] )
|
|
|
|
[ Str "\128077" ]
|
|
|
|
, Str "emoji"
|
|
|
|
, Span
|
|
|
|
( "", [ "emoji" ], [ ( "data-emoji", "heart" ) ] )
|
|
|
|
[ Str "\10084\65039" ]
|
|
|
|
]
|
|
|
|
]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
"hi"
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "\"hi\"" ] ]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm+smart -t native
|
|
|
|
"hi"
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Quoted DoubleQuote [ Str "hi" ] ] ]
|
2017-08-08 22:17:29 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -t gfm -f native
|
2020-03-28 23:22:48 +01:00
|
|
|
[Table ("",[],[]) (Caption Nothing
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "The",Space,Str "caption."]])
|
|
|
|
[(AlignDefault,ColWidthDefault)
|
|
|
|
,(AlignRight,ColWidthDefault)]
|
|
|
|
(TableHead ("",[],[])
|
2020-03-28 23:22:48 +01:00
|
|
|
[Row ("",[],[])
|
2020-04-06 01:53:35 +02:00
|
|
|
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-03-28 23:22:48 +01:00
|
|
|
[Plain [Str "Fruit"]]
|
2020-04-06 01:53:35 +02:00
|
|
|
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "Price"]]]])
|
2020-04-06 01:53:35 +02:00
|
|
|
[(TableBody ("",[],[]) (RowHeadColumns 0)
|
2020-04-04 22:35:42 +02:00
|
|
|
[]
|
|
|
|
[Row ("",[],[])
|
2020-04-06 01:53:35 +02:00
|
|
|
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "apple"]]
|
2020-04-06 01:53:35 +02:00
|
|
|
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "0.13"]]]
|
|
|
|
,Row ("",[],[])
|
2020-04-06 01:53:35 +02:00
|
|
|
[Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "orange"]]
|
2020-04-06 01:53:35 +02:00
|
|
|
,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
|
2020-04-04 22:35:42 +02:00
|
|
|
[Plain [Str "1.12"]]]])]
|
|
|
|
(TableFoot ("",[],[])
|
|
|
|
[])]
|
2017-08-08 22:17:29 +02:00
|
|
|
^D
|
|
|
|
| Fruit | Price |
|
2020-07-19 00:17:06 +02:00
|
|
|
|--------|------:|
|
2017-08-08 22:17:29 +02:00
|
|
|
| apple | 0.13 |
|
|
|
|
| orange | 1.12 |
|
|
|
|
|
|
|
|
The caption.
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm-smart -t gfm+smart
|
|
|
|
“hi”
|
|
|
|
^D
|
|
|
|
"hi"
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm+smart -t gfm-smart
|
|
|
|
"hi"
|
|
|
|
^D
|
|
|
|
“hi”
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm+smart -t gfm+smart
|
|
|
|
"hi"
|
|
|
|
^D
|
|
|
|
"hi"
|
|
|
|
```
|
2017-08-08 22:55:19 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm+hard_line_breaks -t native
|
|
|
|
hi
|
|
|
|
hi
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "hi", LineBreak, Str "hi" ] ]
|
2017-08-08 22:55:19 +02:00
|
|
|
```
|
2019-01-02 20:36:37 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t native
|
|
|
|
- [ ] foo
|
|
|
|
- [x] bar
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ BulletList
|
|
|
|
[
|
|
|
|
[ Plain [ Str "\9744", Space, Str "foo" ] ]
|
|
|
|
,
|
|
|
|
[ Plain [ Str "\9746", Space, Str "bar" ] ]
|
|
|
|
]
|
|
|
|
]
|
2019-01-02 20:36:37 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm-task_lists -t native
|
|
|
|
- [ ] foo
|
|
|
|
- [x] bar
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ BulletList
|
|
|
|
[
|
|
|
|
[ Plain [ Str "[", Space, Str "]", Space, Str "foo" ] ]
|
|
|
|
,
|
|
|
|
[ Plain [ Str "[x]", Space, Str "bar" ] ]
|
|
|
|
]
|
|
|
|
]
|
2019-01-02 20:36:37 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f gfm -t gfm
|
|
|
|
- [ ] foo
|
|
|
|
- [x] bar
|
|
|
|
^D
|
2020-07-19 00:17:06 +02:00
|
|
|
- [ ] foo
|
|
|
|
- [x] bar
|
2019-01-02 20:36:37 +01:00
|
|
|
```
|