Wrap RewriteRule syntax reference - #1044
Conversation
|
@FSchumacher, would you be willing to review this small RewriteValve documentation formatting change? I selected you because of your prior contributions to |
|
@markt-asf, would you also be willing to review this small RewriteValve documentation formatting change? I selected you because you are the leading contributor to |
|
The current one seems readable and fine to me. |
markt-asf
left a comment
There was a problem hiding this comment.
The comment on the Text block applies to all of the blocks.
| expressions:</p> | ||
|
|
||
| <!-- TODO: Why is the following pre-formatted non-wrappable text? --> | ||
| <pre> |
There was a problem hiding this comment.
Removing this is good. This is what the TODO was for,
| <source wrapped="true"><strong>Text:</strong> | ||
| <strong>.</strong> Any single character | ||
| <strong>[</strong>chars<strong>]</strong> Character class: Any character of the class 'chars' | ||
| <strong>[^</strong>chars<strong>]</strong> Character class: Not a character of the class 'chars' | ||
| text1<strong>|</strong>text2 Alternative: text1 or text2 |
There was a problem hiding this comment.
This is the wrong approach. The main issue is that the whole block is not source code, only the first column is. What is required here is a table where the first column uses ... and the second column uses standard text. The formatting for different screen widths should then sort itself out.
Summary
<code>...</code>only for syntax in the first column and standard prose in the secondRationale
The original reference was a raw
preelement and did not adapt to narrow displays. The initial PR revision used Tomcat's wrapped source template, but that treated the entire block as source code. Following review feedback, the table now models the content correctly: syntax is code, descriptions are prose, and the browser can wrap the descriptive column naturally.Impact
This is documentation-only. The five existing sections and their reference content are preserved while the generated markup becomes semantic and responsive.
Validation
ant -q build-docs— passed; generatedrewrite.htmlcontains the two-column tablecodeelements, and all 22 data cells had zero internal overflow at 375 pxant -Dexecute.validate=true validate— passed (Checkstyle 13.9.0 across 7,677 checked files, 54 seconds)ant clean— passed (1 second)ant— passed clean source build (27 seconds; existing deprecation, BND, and Java 8 source/target warnings only)git diff --check— passedant test -Dtest.silent=true -Dtest.threads=4 -Dtest.openssl.path=/opt/homebrew/opt/openssl@3/bin/openssl— passed complete unfiltered suite in 16 minutes 37 seconds: 649 suites, 41,257 tests, 0 failures, 0 errors, 263 project-declared skipsJAVA_HOME=/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home— passed:http://127.0.0.1:8080/docs/rewrite.htmlreturned HTTP 200, contained the new table, and the server PID exited cleanly after shutdown