suryakant-source opened a new pull request, #13680:
URL: https://github.com/apache/maven/pull/13680

   Fixes #13675.
   
   ## Problem
   On https://maven.apache.org/ref/3.10.0/maven-settings/settings.html, several 
descriptions render with an empty inline code element, e.g. "not listed in 
`<code></code>` but activated through `<code></code>` or `<code>-P</code>`", so 
the element names (`<server>`, `<activeProfile>`, ...) are swallowed.
   
   ## Root cause
   In `api/maven-api-settings/src/main/mdo/settings.mdo`, the affected 
descriptions write the element names as `{@code &lt;X&gt;}`. After the .mdo XML 
decoding, modello-plugin-xdoc's `rewrite()` (javadoc-parser + jsoup) receives 
`{@code <X>}` and generates `<code><X></X></code>`: the unknown element inside 
`<code>` is dropped downstream, leaving an empty code element. The raw-markup 
form `<code>&lt;X&gt;</code>`, already used elsewhere in the same file, 
survives the pipeline and renders correctly.
   
   I reproduced this locally with the exact `rewrite()` code path of 
modello-plugin-xdoc using modello's pinned versions (javadoc-parser 0.3.1, 
jsoup 1.23.2): the `{@code &lt;X&gt;}` form produces the nested/broken markup 
while `<code>&lt;X&gt;</code>` produces the correct output.
   
   ## Solution
   Switch the affected descriptions in `settings.mdo` (proxy, server, 
activeProfiles, activation, property.name) from `{@code &lt;X&gt;}` to 
`<code>&lt;X&gt;</code>`. This form renders correctly in both the generated 
site page and the generated javadoc.
   
   ## Testing
   - Local repro harness against modello-plugin-xdoc's `rewrite()` code path 
(javadoc-parser 0.3.1 + jsoup 1.23.2): verified broken output before and 
correct output after for each of the 5 changed spots.
   - Verified the modified `settings.mdo` is still well-formed XML.
   - I could not run the full Maven site build in my environment (no Maven 
available), so the regenerated site page itself was not rebuilt.
   
   ## Risk
   Low: docs-source-only change. Note: the same `{@code &lt;...&gt;}` pattern 
exists in other .mdo files (e.g. `maven.mdo`); I left those untouched here and 
can follow up if the maintainers want them fixed the same way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to