Closed NightMachinery closed 5 years ago
@NightMachinary, If I remember right, pegdown generates only the HTML body content not the rest of the document tags. I no longer have the pegdown project on my system to check.
However, nothing stops you from manipulating the HTML string you get from pegdown rendering to wrap it with your desired HTML or insert the rendered HTML into your document container.
As a worst case scenario if it does generate additional tags, including <body>
and </body>
tags you can easily add HTML before/after the body tag with pegdownHtml.replace("<body>", "your Html Before <body> your HTML after").replace("</body>", " your HTML before /body </body>")
A bit of a kludge but it will get the job done.
Or you can simplify it by stripping off any of the standard tags it adds like <body>
and </body>
wrappers to get the bare body HTML content to wrap as you please with your own HTML.
You can use Perun's render
task to do this - your render function can just concatenate some html strings together.
Seems solved. I will close it.
I want something like this:
This should be fairly easy, so? At worst add a new tag like
<html-follow>
and just put its content directly into the generated final HTML.