Open
Description
In our Markdown files, we use colon-delimited prefixes to indicate metadata fields specific to certain content processing subsystems.
If I have a Markdown input file with a YAML metadata block as follows:
---
title: My Document
myapp:status: published
myapp:label: abc=123
---
# My Document
This is a document.
and I publish this to DITA (just to see how the metadata is converted):
dita -i topic.md -f dita
the resulting DITA is as follows:
<topic id="my-document">
<title>My Document</title>
<prolog>
<data name="myapp" value="label: abc=123"/>
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
<data name="title" value="My Document"/>
</prolog>
<body>
<p>This is a document.</p>
</body>
</topic>
The literal colon (:
) characters in the YAML field names are incorrectly interpreted as separators. If this same input file is processed through pandoc
:
pandoc -s topic.md -o topic-NEW.md
then the fields are parsed and preserved correctly:
---
myapp:label: abc=123
myapp:status: published
title: My Document
---
# My Document
This is a document.