Skip to content

Conversation

@jhradilek
Copy link
Owner

When the <li> element only contained inline markup without any text around it, when converting it to a step, the dita-convert utility incorrectly used only the first element as <cmd> and moved the rest to <info>. This pull request corrects this behavior.

Example DITA input

<ol>
  <li>
    <ph>First phrase.</ph>
    <ph>Second phrase.</ph>
  </li>
</ol>

Incorrect DITA output

<steps>
  <step>
    <cmd>First phrase.</cmd>
    <info>
      <ph>Second phrase.</ph>
    </info>
  </step>
</steps>

Corrected DITA output

<steps>
  <step>
    <cmd>
      <ph>First phrase.</ph>
      <ph>Second phrase.</ph>
    </cmd>
  </step>
</steps>

Implementation checklist

  • The code changes come with the corresponding test cases
  • The code changes pass all tests (run python3 -m unittest in the project directory)
  • The code changes come with appropriate documentation

@jhradilek jhradilek self-assigned this Oct 21, 2025
@jhradilek jhradilek added the bug Something isn't working label Oct 21, 2025
@jhradilek jhradilek merged commit 5979842 into main Oct 22, 2025
5 checks passed
@jhradilek jhradilek deleted the fix-cmd branch October 22, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants