aboutsummaryrefslogtreecommitdiff
path: root/test/fb2
AgeCommit message (Collapse)AuthorFilesLines
2021-09-28Switch from pretty-simple to pretty-show for native output.John MacFarlane6-158/+168
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-21Use pretty-simple to format native output.John MacFarlane6-43/+182
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.)
2021-05-29Further test image size reductions.John MacFarlane2-1/+1
2021-05-29Reduce size of image in fb2 image test.John MacFarlane1-0/+0
2019-05-15FB2 writer: do not wrap note references into <sup> and bracketsAlexander Krotov1-3/+1
Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
2019-05-11FB2 reader: add notes parsing testAlexander Krotov2-0/+23
2019-02-22Add section identifiers support for FB2 writer (#5315)John2-4/+4
Closes #5229.
2018-06-12FB2 writer: convert Plain to Para in annotationAlexander Krotov1-1/+1
Address #2424
2018-04-26Add FB2 reader (#4539)Alexander10-0/+140
2018-04-26Merge branch 'fb2-hrblankline' of https://github.com/labdsf/pandoc into ↵John MacFarlane1-2/+74
labdsf-fb2-hrblankline
2018-04-19FB2 writer: convert metadata value "abstract" to book annotationAlexander Krotov2-0/+10
2018-04-07FB2 writer: output links inline instead of producing notesAlexander Krotov1-1/+1
Previously all links were turned into footnotes with unclickable URLs inside.
2018-04-05FB2 writer: represent HorizontalRule as empty lineAlexander Krotov1-1/+7
HorizontalRule corresponds to <hr> element in the default output format, HTML. Current HTML standard defines <hr> element as "paragraph-level thematic break". In typography it is often represented by extra space or centered asterism ("⁂"), but since FB2 does not support text centering, empty line (similar to extra space) is the only solution. Line breaks, on the other hand, don't generate <empty-line /> anymore. Previously line breaks generated <empty-line /> element inside paragraph, which is not allowed. So, this commit addresses issue #2424 ("FB2 produced by pandoc doesn't validate"). FB2 does not have a way to represent line breaks inside paragraphs. They are replaced with LF character, which is not rendered by FB2 readers, but at least preserves some information.
2018-04-04FB2 writer: allow emphasis and notes in titlesAlexander Krotov2-2/+2
Only <p> and <empty-line /> are allowed in titles, but <p> has the same type as an ordinary paragraphs. Therefore, there is no need to remove emphasis from titles. Also, don't intersperse paragraph with empty lines.
2017-11-01FB2 writer: Add "unrecognised" genre to <title-info>Alexander Krotov5-5/+5
XML schema requires at least one genre.
2017-11-01FB2 writer: remove <annotation> from <body>Alexander Krotov5-5/+5
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>. Related bug: #2424
2017-10-29Write FB2 lists without nesting blocks inside <p> (#4004)Alexander1-1/+1
According to FB2 XML schema <empty-line /> cannot be placed inside <p>. Linux FBReader can't display such paragraphs, e.g. any "loose" lists produced by pandoc prior to this commit. Besides that, FB2 writer placed <p> inside <p> when writing nested lists, this commit fixes the bug. Also this commit removes leading non-breaking space from ordered lists for consistency with bullet lists. Definition lists are not affected at all.
2017-06-11Don't allow backslash + newline to affect block structure.John MacFarlane2-5/+1
Note that as a result of this change, the following, which formerly produced a header with two lines separated by a line break, will now produce a header followed by a paragraph: # Hi\ there This may affect some existing documents that relied on this undocumented and unintended behavior. This change makes pandoc more consistent with other Markdown implementations, and with itself (since the two-space version of a line break doesn't work inside ATX headers, and neither version works inside Setext headers). Closes #3730.
2017-02-04Moved tests/ -> test/.John MacFarlane12-0/+92