From 1425bf9a6549da00ca87832dc6f19d59269a6a83 Mon Sep 17 00:00:00 2001 From: Daniele D'Orazio Date: Wed, 9 Oct 2019 10:10:08 +0200 Subject: Add support for reading and writing elements * Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change] This commit also introduces a mapping of HTML span like elements that are internally represented as a Span with a single class, but that are converted back to the original element by the html writer. As of now, only the kbd element is handled this way. Ideally these elements should be handled as plain AST values, but since that would be a breaking change with a large impact, we revert to this stop-gap solution. Fixes https://github.com/jgm/pandoc/issues/5796. --- test/command/5805.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/command/5805.md (limited to 'test') diff --git a/test/command/5805.md b/test/command/5805.md new file mode 100644 index 000000000..8bfc75f2d --- /dev/null +++ b/test/command/5805.md @@ -0,0 +1,20 @@ +``` +% pandoc -f html -t html +Ctrl-C +^D +Ctrl-C +``` + +``` +% pandoc -f html -t native +Ctrl-C +^D +[Plain [Span ("",["kbd"],[]) [Str "Ctrl-C"]]] +``` + +``` +% pandoc -f native -t html +[Plain [Span ("",["kbd"],[]) [Str "Ctrl-C"]]] +^D +Ctrl-C +``` -- cgit v1.2.3