c266734448
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
1.7 KiB
1.7 KiB
% pandoc -f native -t docx -o - | pandoc -f docx -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
[ Para [ Str "hi" ], Para [ Str "lo" ] ]
% pandoc -f native -t docx+empty_paragraphs -o - | pandoc -f docx -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
[ Para [ Str "hi" ], Para [ Str "lo" ] ]
% pandoc -f native -t docx -o - | pandoc -f docx+empty_paragraphs -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
[ Para [ Str "hi" ], Para [ Str "lo" ] ]
% pandoc -f native -t docx+empty_paragraphs -o - | pandoc -f docx+empty_paragraphs -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
[ Para [ Str "hi" ], Para [], Para [], Para [ Str "lo" ] ]
% pandoc -f native -t html5
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
<p>hi</p>
<p>lo</p>
% pandoc -f native -t html5+empty_paragraphs
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
<p>hi</p>
<p></p>
<p></p>
<p>lo</p>
% pandoc -f html+empty_paragraphs -t native
<p>hi</p>
<p></p>
<p></p>
<p>lo</p>
^D
[ Para [ Str "hi" ], Para [], Para [], Para [ Str "lo" ] ]
% pandoc -f html -t native
<p>hi</p>
<p></p>
<p></p>
<p>lo</p>
^D
[ Para [ Str "hi" ], Para [ Str "lo" ] ]
% pandoc -f native -t opendocument+empty_paragraphs
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
<text:p text:style-name="Text_20_body">hi</text:p>
<text:p text:style-name="Text_20_body"></text:p>
<text:p text:style-name="Text_20_body"></text:p>
<text:p text:style-name="Text_20_body">lo</text:p>
% pandoc -f native -t opendocument
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
<text:p text:style-name="Text_20_body">hi</text:p>
<text:p text:style-name="Text_20_body">lo</text:p>