From f224567d52096fd6219a2a4a4d2b9cbcc5219e7a Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 4 Apr 2018 02:41:56 +0300 Subject: FB2 writer: represent HorizontalRule as empty line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HorizontalRule corresponds to
element in the default output format, HTML. Current HTML standard defines
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 anymore. Previously line breaks generated 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. --- test/tables.fb2 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'test/tables.fb2') diff --git a/test/tables.fb2 b/test/tables.fb2 index 56ed5316b..6be553df9 100644 --- a/test/tables.fb2 +++ b/test/tables.fb2 @@ -1,3 +1,16 @@ -unrecognisedpandoc<p />

Simple table with caption:

RightLeftCenterDefault
12121212
123123123123
1111

Demonstration of simple table syntax.

Simple table without caption:

RightLeftCenterDefault
12121212
123123123123
1111

Simple table indented two spaces:

RightLeftCenterDefault
12121212
123123123123
1111

Demonstration of simple table syntax.

Multiline table with caption:

Centered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.

Here’s the caption. It may span multiple lines.

Multiline table without caption:

Centered HeaderLeft AlignedRight AlignedDefault aligned
Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.

Table without column headers:

12121212
123123123123
1111

Multiline table without column headers:

Firstrow12.0Example of a row that spans multiple lines.
Secondrow5.0Here’s another one. Note the blank line between rows.

+unrecognisedpandoc<p />

Simple table with caption:

RightLeftCenterDefault
12121212
123123123123
1111

Demonstration of simple table syntax.

Simple table without caption:

RightLeftCenterDefault
12121212
123123123123
1111

Simple table indented two spaces:

RightLeftCenterDefault
12121212
123123123123
1111

Demonstration of simple table syntax.

Multiline table with caption:

Centered +HeaderLeft +AlignedRight +AlignedDefault aligned
Firstrow12.0Example of a row that spans +multiple lines.
Secondrow5.0Here’s another one. Note +the blank line between rows.

Here’s the caption. +It may span multiple lines.

Multiline table without caption:

Centered +HeaderLeft +AlignedRight +AlignedDefault aligned
Firstrow12.0Example of a row that spans +multiple lines.
Secondrow5.0Here’s another one. Note +the blank line between rows.

Table without column headers:

12121212
123123123123
1111

Multiline table without column headers:

Firstrow12.0Example of a row that spans +multiple lines.
Secondrow5.0Here’s another one. Note +the blank line between rows.

-- cgit v1.2.3