MD -> DITA: Escaped '[]' not ignored

deepbluesea70
Posts: 10
Joined: Tue Aug 27, 2019 3:52 pm

MD -> DITA: Escaped '[]' not ignored

Post by deepbluesea70 » Thu Aug 20, 2020 3:00 pm

Hi there,

I use XML Author 21.1 to convert markdown to DITA (File -> Open -> [Open MD File]).

Works well, but I came across a problem with brackets '[]'. We usually use them to indicate that readers need to put in there specific value in a path. To avoid that these are interpreted as link or reference in markdown, I escaped them, like in the following example:

Code: Select all

Choose *CLUSTERS* > *\[YOUR-CLUSTER\]* > *OVERVIEW* > *Lifecycle* > *Maintenance*.
Conversion result:

Code: Select all

Choose
<i>CLUSTERS</i> &gt; <i>\[YOUR-CLUSTER\]</i> &gt; <i>OVERVIEW</i> &gt; <i>Lifecycle</i> &gt; <i>Maintenance</i>.
In my opinion, the slashes in '\[YOUR-CLUSTER\] should be omitted in the conversion result. I also tried using just one escaping backslash (for the first bracket), but then that one is part of the conversion result.

If I leave them both out, the conversion parses a markdown link (which I don't want either):

Code: Select all

Choose
<i>CLUSTERS</i> &gt; <i><xref keyref="YOUR-CLUSTER"/></i> &gt; <i>OVERVIEW</i> &gt; <i>Lifecycle</i> &gt; <i>Maintenance</i>
Is there any way to get around this? A special escape character I may not know? Or is this a bug?

Thank you,
Jens

alex_jitianu
Posts: 781
Joined: Wed Nov 16, 2005 11:11 am

Re: MD -> DITA: Escaped '[]' not ignored

Post by alex_jitianu » Fri Aug 21, 2020 5:20 pm

Hello,,

Oxygen version 21.1 comes bundled with DITA-OT 3.3.1 and relies on it for MD conversions. The issue you encountered has been resolved in DITA-OT 3.4: https://github.com/dita-ot/dita-ot/issues/3267

Oxygen 22, for example, comes bundled with DITA-OT 3.4 and doesn't have this issue anymore. As an workaround, you can set up Oxygen to use a newer DITA-OT: https://www.oxygenxml.com/doc/versions/ ... ta-ot.html

Best regards,
Alex

deepbluesea70
Posts: 10
Joined: Tue Aug 27, 2019 3:52 pm

Re: MD -> DITA: Escaped '[]' not ignored

Post by deepbluesea70 » Mon Aug 24, 2020 11:19 am

Thank you Alex, I downloaded XML Author 22.1 and now it works!

Post Reply