Open salbeira opened 6 months ago
Please give me an example when that happens. What are the HTML values, where do you set them, where and how do you reference them?
Inside decker.yaml
:
watermark: '<img src="foo.png">'
becomes the text <img src="foo.png">
as a watermark.
Inside -deck.md
:
watermark: '<img src="foo.png">'
becomes the image.
The variable is evaluated inside the template:
$if(watermark)$
<div class="watermark">
$watermark$
</div>
$endif$
I see.
Pandoc parses metadata values in the document as Markdown, recognizes plain HTML and converts it to an inline Image.
The YAML parser used for .yaml
files does not do that and handles the value as a string.
At some point the values from the YAML parser are converted to Pandoc Meta values. We could try to parse the string values with Pandoc and replace them with whatever comes out of that. This has the potential to break a lot of things.
Postponed until after the next milestone.
@monofon Which tool do you use for parsing the metadata?
The standard Haskell YAML parser:
The standard Haskell YAML parser:
* https://hackage.haskell.org/package/yaml
Does it have something like a escape flag? That could be easily disabled when calling that library.
Parse decker.yaml meta values as markdown if possible.
In any case, meta values as template data should behave the same regardless where they are defined.
The title describes it all.
While there are moments where you may not want HTML to be escaped when placed inside config- / meta-variables this is diverging behavior.
This should be equalized and variables that should not be escaped should have a mechanism to declare them as "unescaped".
If there does already exist such a mechanism it is not documented anywhere (inside this project).