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/fb2/basic.fb2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/fb2') diff --git a/test/fb2/basic.fb2 b/test/fb2/basic.fb2 index b6160a9a5..9dc1926f1 100644 --- a/test/fb2/basic.fb2 +++ b/test/fb2/basic.fb2 @@ -1,3 +1,9 @@ -unrecognisedpandoc<p />
<p>Top-level title</p>
<p>Section</p>
<p>Subsection</p>

This emphasized strong verbatim markdown. See this link[1].

Ordered list:

1. one

2. two

3. three

Blockquote is for citatons.

Code

block

is

for

code.

Strikeout is Pandoc’s extension. Superscript and subscripts too: H2O is a liquid[2]. 210 is 1024.

Math is another Pandoc extension: E = m c^2.

<p>1</p>

http://example.com/

<p>2</p>

Sometimes.

+unrecognisedpandoc<p />
<p>Top-level title</p>
<p>Section</p>
<p>Subsection</p>

This emphasized strong verbatim markdown. +See this link[1].

Ordered list:

1. one

2. two

3. three

Blockquote +is +for +citatons.

Code

block

is

for

code.

Strikeout is Pandoc’s extension. +Superscript and subscripts too: H2O is a liquid[2]. +210 is 1024.

Math is another Pandoc extension: E = m c^2.

<p>1</p>

http://example.com/

<p>2</p>

Sometimes.

-- cgit v1.2.3