Skip to content

Wrap RewriteRule syntax reference - #1044

Merged
markt-asf merged 2 commits into
apache:mainfrom
sainadh777:fix/rewrite-regex-reference-wrap
Aug 18, 2026
Merged

Wrap RewriteRule syntax reference#1044
markt-asf merged 2 commits into
apache:mainfrom
sainadh777:fix/rewrite-regex-reference-wrap

Conversation

@sainadh777

@sainadh777 sainadh777 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the RewriteRule regular-expression syntax reference with a semantic two-column table
  • use <code>...</code> only for syntax in the first column and standard prose in the second
  • remove the checked-in TODO about the non-wrapping block
  • add the corresponding changelog entry

Rationale

The original reference was a raw pre element 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; generated rewrite.html contains the two-column table
  • generated-page responsive inspection at 1280 px and 375 px viewports — passed; all five section headings were present, the description column contained no code elements, and all 22 data cells had zero internal overflow at 375 px
  • ant -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 — passed
  • ant 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 skips
  • generated-distribution smoke with JAVA_HOME=/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home — passed: http://127.0.0.1:8080/docs/rewrite.html returned HTTP 200, contained the new table, and the server PID exited cleanly after shutdown

@sainadh777

Copy link
Copy Markdown
Contributor Author

@FSchumacher, would you be willing to review this small RewriteValve documentation formatting change? I selected you because of your prior contributions to webapps/docs/rewrite.xml. Thank you.

@sainadh777
sainadh777 marked this pull request as ready for review August 16, 2026 06:37
@sainadh777

Copy link
Copy Markdown
Contributor Author

@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 webapps/docs/rewrite.xml. Thank you.

@rmaucher

Copy link
Copy Markdown
Contributor

The current one seems readable and fine to me.

@markt-asf markt-asf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on the Text block applies to all of the blocks.

Comment thread webapps/docs/rewrite.xml
expressions:</p>

<!-- TODO: Why is the following pre-formatted non-wrappable text? -->
<pre>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this is good. This is what the TODO was for,

Comment thread webapps/docs/rewrite.xml Outdated
Comment on lines +530 to +534
<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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sainadh777
sainadh777 requested a review from markt-asf August 17, 2026 15:31
@markt-asf
markt-asf merged commit 853b54e into apache:main Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants