Skip to content

AG-43979 Fix max-length default claim and note title in HTML filtering docs - #949

Open
slvvko wants to merge 1 commit into
masterfrom
fix/AG-43979-follow-up-01
Open

slvvko wants to merge 1 commit into
masterfrom
fix/AG-43979-follow-up-01

Conversation

@slvvko

@slvvko slvvko commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to #927 (Document raw-text :contains() arguments of HTML filtering rules), addressing the two review comments left by @maximtop after that PR was merged ("A few nits inline, can go into a follow-up").

  • docs/general/ad-filtering/create-own-filters.md
    • Special attributes → max-length: removed the Default value paragraph ("If this parameter is not specified, the max-length is considered to be 8192.").
    • Pseudo-classes → :contains(): dropped the redundant "Note" title, now a plain :::note like the one above.

Why

The max-length paragraph stated a default that neither CoreLibs nor the extension has, and it contradicted the [tag-content] → :contains() conversion table right above it: $$div[tag-content="banner"] converts to $$div:contains(banner) with no length constraint, and the agtree converter emits a length regexp only when [max-length] is present. No user-visible rule syntax changes — the text simply no longer claims a default.

The :::note Note title carried no information, so it was dropped to match the untitled :::note used earlier in the same article.

Verification

  • npx markdownlint-cli2 docs/general/ad-filtering/create-own-filters.md — 0 errors.
  • grep -rn "8192" docs/ — no occurrences left.
  • Diff is 2 hunks: 5 lines removed, 1 line changed.

Notes

  • Related follow-up outside this repo: tsurlfilter's packages/agtree/src/converter/cosmetic/html.ts still has a code comment claiming the same 8192 default (line 56 on master); it should be corrected there separately.

…g docs

Follow-up to #927 addressing the review comments left by @maximtop:

- Remove the "Default value" paragraph of the `max-length` special
  attribute: neither CoreLibs nor the extension applies a default
  max-length, and the paragraph contradicted the `[tag-content]` ->
  `:contains()` conversion table, which adds no length constraint.
- Drop the redundant "Note" title from the `:contains()` synonyms
  admonition, so it uses a plain `:::note` like the one above.
@github-actions

Copy link
Copy Markdown

Preview was deployed to: https://pull-request-949.kb-adg.pages.dev/

@slvvko slvvko changed the title [AG-43979] Fix max-length default claim and note title in HTML filtering docs AG-43979 Fix max-length default claim and note title in HTML filtering docs Oct 16, 2026
@slvvko
slvvko marked this pull request as ready for review October 16, 2026 19:56
@slvvko
slvvko requested review from SeverAnna and maximtop October 16, 2026 19:56

This branch has not been deployed

No deployments
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.

1 participant