pandoc/test/command/4743.md
John MacFarlane 0bdcf415e4 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.
2021-09-28 21:17:53 -07:00

45 lines
1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Test that emojis are wrapped in Span
```
% pandoc -f commonmark+emoji -t native
My:thumbsup:emoji:heart:
^D
[ Para
[ Str "My"
, Span
( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
[ Str "\128077" ]
, Str "emoji"
, Span
( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
[ Str "\10084\65039" ]
]
]
```
```
% pandoc -f markdown+emoji -t native
My:thumbsup:emoji:heart:
^D
[ Para
[ Str "My"
, Span
( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
[ Str "\128077" ]
, Str "emoji"
, Span
( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
[ Str "\10084\65039" ]
]
]
```
```
% pandoc -f commonmark+emoji -t html
:zero: header
=============
My:thumbsup:emoji:heart:x :hearts: xyz
^D
<h1><span class="emoji" data-emoji="zero">0⃣</span> header</h1>
<p>My<span class="emoji" data-emoji="thumbsup">👍</span>emoji<span class="emoji" data-emoji="heart">❤️</span>x <span class="emoji" data-emoji="hearts">♥️</span> xyz</p>
```