slachiewicz commented on PR #149:
URL: 
https://github.com/apache/maven-doxia-converter/pull/149#issuecomment-5234427766

   Added `b0da599` with four more traps from the ongoing migration, all the 
same shape: green
   build, unchanged text, damage in markup the text comparison does not inspect.
   
   **Two of the four came in as field reports that did not reproduce as 
described, so what is on
   the page is the corrected mechanism**, checked here before writing:
   
   * The report was that the converter emits ` ```unknown ` for *both* APT 
verbatim forms, so
     substituting a language over-boxes. It does not: converting a fixture with 
both forms gives
     ` ```unknown ` for `+---+` and a bare fence for `---`, and the same split 
for xdoc `<source>`
     against `<pre>`. The real error is the inverse — adding a language to a 
fence the converter
     left bare — so the page now says to key on the literal `unknown` and 
nothing else.
   * The report was that an `<a name="…">` on its own line gets wrapped in a 
`<p>` and costs the
     *following* heading its id, with the fix being to glue the anchor to the 
end of the preceding
     block. Headings kept their ids in every case I tried, and the glued form 
did not survive
     either. The actual behaviour, from a controlled pair on one line:
   
     ```
     <a name="x"></a>          ->  (nothing at all)
     <a id="x"></a>            ->  <a id="x"></a>
     <a name="x" id="x"></a>   ->  <a id="x"></a>
     ```
   
     The obsolete `name` attribute is dropped, which leaves an element with no 
attributes and no
     content, and that is discarded. So the anchor is deleted outright rather 
than displaced, and
     the fix is to write `id`. Same visible symptom, different cause, and a fix 
that works.
   
   The other two additions:
   
   * **What the comparison cannot see.** `normalize-site-page.py` drops every 
attribute but `href`
     — that is what makes it quiet enough to read — so `<pre class="prettyprint 
linenums">` and a
     bare `<pre>` compare equal, an `<a>` with no `href` leaves no token, and 
`<ol>`/`<ul>` are both
     `[ITEM]`. A tree-wide unboxing passes on every page. Added a second 
structural pass over the
     tag sequence and the anchor id set, with a recipe I ran against this 
project's pages.
   * **The escaping rule stated properly.** Escaping is needed only where the 
page *displays* a
     reference **and** the name *resolves*. Displayed-and-unresolvable 
(`${basedir}`) passes through
     either way; resolved-and-displayed (`${project.build.outputDirectory}`) is 
the only bug, and it
     publishes an absolute path from the build machine. Now a small table.
   
   `mvn site` and `mvn verify` green locally (JDK 21, Maven 3.9.16, macOS); RAT 
0 unapproved, 23/23.
   All ten `<h2>`, the new `<h3>` and the table render.
   


-- 
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