Skip to content

Commit e8b301e

Browse files
niszettarleb
authored andcommitted
Add asciidoc format to pagebreak.lua
For asciidoc and asciidoctor format, pagebrek.lua is updated. Syntax is from AsciiDoc Syntax Quick Reference. https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#breaks Currently, RawBlock in AsciiDoc Writer does not add new lines. So, this update have "\n\n" to separate paragraphs.
1 parent 3f9c03a commit e8b301e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pagebreak/pagebreak.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ local pagebreak = {
2828
latex = '\\newpage{}',
2929
ms = '.bp',
3030
ooxml = '<w:p><w:r><w:br w:type="page"/></w:r></w:p>',
31-
odt = '<text:p text:style-name="Pagebreak"/>'
31+
odt = '<text:p text:style-name="Pagebreak"/>',
32+
asciidoc = '<<<\n\n'
3233
}
3334

3435
local function pagebreaks_from_config (meta)
@@ -61,6 +62,8 @@ local function newpage(format)
6162
return pandoc.RawBlock('html', pagebreak.epub)
6263
elseif format:match 'ms' then
6364
return pandoc.RawBlock('ms', pagebreak.ms)
65+
elseif format:match 'asciidoc' then
66+
return pandoc.RawBlock('asciidoc', pagebreak.asciidoc)
6467
else
6568
-- fall back to insert a form feed character
6669
return pandoc.Para{pandoc.Str '\f'}

0 commit comments

Comments
 (0)