Skip to content

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

Merged
slvvko merged 2 commits into
masterfrom
fix/AG-43979-follow-up-01
Oct 19, 2026
Merged

slvvko merged 2 commits 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

@maximtop maximtop 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.

A couple of nits nearby, outside the diff:

  • min-length example: "exceeds 400 characters" — the rule also matches exactly 400. Should be "is at least 400 characters".
  • 65535 note: the extension still converts [min-length]/[max-length] above 65535 to :contains(), JS regexps have no such limit. So "no :contains() equivalent" holds only for CoreLibs-based apps, worth saying so.

@github-actions

Copy link
Copy Markdown

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

@slvvko
slvvko merged commit 5087f38 into master Oct 19, 2026
3 checks passed
@slvvko
slvvko deleted the fix/AG-43979-follow-up-01 branch October 19, 2026 23:02
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