Page 1 of 1

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

Posted: Thu Aug 20, 2020 3:00 pm
by deepbluesea70
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

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

Posted: Fri Aug 21, 2020 5:20 pm
by alex_jitianu
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

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

Posted: Mon Aug 24, 2020 11:19 am
by deepbluesea70
Thank you Alex, I downloaded XML Author 22.1 and now it works!