ISSUE: Markdown output comes out as a single line

Post here questions and problems related to editing and publishing DITA content.
GHogarth
Posts: 26
Joined: Tue Aug 27, 2019 10:55 pm

ISSUE: Markdown output comes out as a single line

Post by GHogarth »

Starting from a DITA book, I have tried both the regular Markdown and the GitHub-flavored Markdown Transformations, and both produce the output as a single line, which renders all the output as if it was a *very* long title. :?
All the interior markup appears to be correct, there are just not the CRs to break the lines.
I'm sure it's just a setting I'm missing. The map is: <bookmap chunk='to-content'>
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: ISSUE: Markdown output comes out as a single line

Post by Radu »

Hi,

What version of Oxygen are you using and what DITA OT? Is it the DITA OT bundled with Oxygen or an external DITA OT installation?
I tried setting chunk=to-content on this sample bookmap we have OXYGEN_INSTALL_DIR/samples/dita/it-book/taskbook.ditamap, generated Markdown content and the markdown content was not generated on a single line, I opened the result in Oxygen and it seems to be proper Markdown content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GHogarth
Posts: 26
Joined: Tue Aug 27, 2019 10:55 pm

Re: ISSUE: Markdown output comes out as a single line

Post by GHogarth »

Hi Radu
<oXygen/> XML Editor 22.0, build 2020021016
DITA-OT ver 3.x as bundled
===========
Discovered if I rename the file to "abc123.MD", the file is handled correctly. "abc123.HTML" (what gets produced by the transform), comes in as an single line.
Is there a way to change the default extention applied as part of the transform?

Regards
Grant
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: ISSUE: Markdown output comes out as a single line

Post by Radu »

Hi Grant,

There is a registered issue I added to the DITA to MD publishing plugin to set the default output extension as "md":

https://github.com/jelovirt/org.lwdita/issues/65

but as it says on the issue you can edit the transformation scenario and in the "Parameters" tab set the "out.ext" parameter to ".md".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GHogarth
Posts: 26
Joined: Tue Aug 27, 2019 10:55 pm

Re: ISSUE: Markdown output comes out as a single line

Post by GHogarth »

Thanks!
I'm confused though.
Per your bug [https://github.com/jelovirt/org.lwdita/issues/65]
I tried adding "out.ext" with a value of "md" (no quotes) to the transform, but it doesn't seem to have taken.
Am I editing the wrong place/file?
In ignorance and appreciation,
Grant
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: ISSUE: Markdown output comes out as a single line

Post by Radu »

Hi Grant,

Where exactly did you add this parameter? Also try to set its value to ".md" without the quotes but with that extra dot.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GHogarth
Posts: 26
Joined: Tue Aug 27, 2019 10:55 pm

Re: ISSUE: Markdown output comes out as a single line

Post by GHogarth »

Hi Radu.
I added

Code: Select all

.md
as a parameter to my version of the markdown transformation scenario.
I had not used quotes, but also did not use the period; FWIW, adding the period made no difference in the output. <smile>

Grant
GHogarth
Posts: 26
Joined: Tue Aug 27, 2019 10:55 pm

RESOLVED: Markdown output comes out as a single line

Post by GHogarth »

Hi Radu.
I discovered that I also needed to set the

Code: Select all

transtype
value for the transformation to markdown to get the correct output format.
Grant
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: ISSUE: Markdown output comes out as a single line

Post by Radu »

Hi Grant,

If in the Configure Transformation Scenarios dialog you press the New button and choose "DITA OT" transformation, the dialog which shows allows you to choose Markdown or Github-flavored Markdown transformation types. After this the scenario should already have information about the transtype without you needing to manually set a value for it in the Parameters list. So I'm not sure why this last step was necessary for you.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
willwolf
Posts: 2
Joined: Tue Jan 14, 2020 3:22 am

Re: ISSUE: Markdown output comes out as a single line

Post by willwolf »

I want to output Markdown from DITA but I don't see Markdown as a transformation output option. Am I missing something? Thank you.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: ISSUE: Markdown output comes out as a single line

Post by Radu »

Hi,

Per my reply above, open the DITA Map in the DITA Maps Manager view and click the "Configure Transformation Scenarios" toolbar button.
If in the Configure Transformation Scenarios dialog you press the New button and choose "DITA OT" transformation, the dialog which shows allows you to choose Markdown or Github-flavored Markdown transformation types.
If you do not have that option on your side you are either using a custom DITA OT publishing engine (Preferences->DITA page) or you are using a very old Oxygen installation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply