DeepBlueCLtd / LegacyMan

Legacy content for Field Service Manual
https://deepbluecltd.github.io/LegacyMan/index.html
Apache License 2.0
2 stars 0 forks source link

Prettify is mangling html #641

Closed IanMayo closed 6 months ago

IanMayo commented 6 months ago

We have this source content:

                <ul>
                    <li>Phase A</li>
                    <li><a href="#">Phase B</a>.</li>
                    <li><a href="#">Phase C</a>.</li>
                </ul>

This produces this DITA:

                <ul>
                    <li>Phase A</li>
                    <li>
                        <xref href="#">Phase B</xref>
                        .
                    </li>
                    <li>
                        <xref href="#">Phase C</xref>
                        .
                    </li>
                </ul>

Which is exported to this HTML: image

Note how the full-stop / period is on a line of its own. This produces this published content: image

Note the space between the link and the period.

However, if we cancel the prettify_xml step the content remains structured the same as the original: image

Hmm, we have choices:

  1. remove prettify_xml. This affects the readability of the DITA, but the Authors will only interact with this via WYSIWYG view anyway.
  2. follow the prettify with a find/replace that fixes the above issue (it's quite common across the document set)
  3. after the export is complete use VS-Code global find/replace to correct the generated DITA

I'm tempted to go for 1., until it frustrates me.

IanMayo commented 6 months ago

Done, for now.