Skip to content

How to pass through custom tags? #172

Closed
@aviflax

Description

@aviflax

Hi, I’m attempting to render some Markdown documents that often include custom HTML tags, for example a tag like ac:structured-macro when a document is going to be published to a Confluence site.

With the simple, naïve, vanilla conversion that I’ve implemented so far, the custom tags are escaped in the output.

For example:

<ac:structured-macro ac:name="include"
                          ac:schema-version="1"
                          ac:macro-id="fbad7a5b-35fa-4d13-87ed-953ffd4dc456">
       <ac:parameter ac:name="">
         <ac:link><ri:page ri:content-title="mt" /></ac:link>
       </ac:parameter>
     </ac:structured-macro>

is being rendered as

<p>&lt;ac:structured-macro ac:name=&quot;include&quot;
ac:schema-version=&quot;1&quot;
ac:macro-id=&quot;fbad7a5b-35fa-4d13-87ed-953ffd4dc456&quot;&gt;
&lt;ac:parameter ac:name=&quot;&quot;&gt;
<a href="ac:link">ac:link</a>&lt;ri:page ri:content-title=&quot;mt&quot; /&gt;&lt;/ac:link&gt;
&lt;/ac:parameter&gt;
&lt;/ac:structured-macro&gt;</p>

I perused the docs, including the Javadocs, but didn’t see much that seemed directly relevant to this. (I did notice HtmlRenderer.Builder.escapeHtml() but I’m not calling that method, so the default, false should be in effect.)

Is there a way to do this?

Thank you!

(I’m using 0.15.0 on AdoptOpenJDK 13.0.2+8 on an AMD64 machine running MacOS 10.15.5.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions