Skip to content

Conversation

@jhradilek
Copy link
Owner

While it is intuitive for the first paragraph of a topic to be designated as the short description, it is not strictly required and is not what the corresponding Vale rule actually checks for. This pull request changes the logic to allow any paragraph in the main body of the topic to be used as the short description.

Example DITA input

<topic id="example-topic">
  <body>
    <p>Topic introduction</p>
    <p outputclass="abstract">Topic abstract</p>
  </body>
</topic>

Example DITA output

<task id="example-topic">
  <shortdesc>Topic abstract</shortdesc>
  <taskbody>
    <context>
      <p>Topic introduction</p>
    </context>
  </taskbody>
</task>

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 22, 2025
@jhradilek jhradilek added the enhancement New feature or request label Oct 22, 2025
@jhradilek jhradilek merged commit b4722d5 into main Oct 22, 2025
5 checks passed
@jhradilek jhradilek deleted the relax-shortdesc-placement branch October 22, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants