DCsunset / pandoc-include

A pandoc filter to allow file and header inclusion
MIT License
63 stars 14 forks source link

Hard line breaks are not preserved #27

Closed lucalenardi closed 2 years ago

lucalenardi commented 2 years ago

Pandoc offers an extension for managing hard line breaks within markdown: hard_line_break extension. Unfortunately this extension is not preserved on included files.

For example, issuing:

pandoc --filter pandoc-include --from=markdown+hard_line_breaks -o mainfile.pdf mainfile.md

with this file:

mainfile.md

This will support
hard line break.

<!--- this will not  -->
!include inclusion.md

All the hard brakes are skipped on the included file. Also html tags (such as <br />) seems to be stripped off the included file.

DCsunset commented 2 years ago

Hi, you can use the format option when including a file to specify the extension to use:

!include`format="markdown+hard_line_breaks"` inclusion.md

In this way you can preserve the hard line breaks.