Skip to content

fix: add configurability to search stop words#99

Merged
tylerdave merged 2 commits into
mainfrom
search-stop-words
Apr 6, 2026
Merged

fix: add configurability to search stop words#99
tylerdave merged 2 commits into
mainfrom
search-stop-words

Conversation

@tylerdave

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Docs Site preview: https://7896a674.rockgarden.pages.dev

claude[bot]

This comment was marked as outdated.

claude[bot]

This comment was marked as outdated.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The CDN auto-detection and search stopwords features look well-implemented. The incremental build consistency bug (previous issue #2) is now properly fixed by including cdn_flags in the manifest. One previously-flagged regex issue at line 436 remains.

# Resolve CDN auto-detection by scanning raw content
math_cdn = config.theme.math_cdn
if math_cdn == "auto":
_math_re = re.compile(r"\$\$|```math|\$[^\s\d$]")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Previously flagged and still present. \$[^\s\d$] still false-positives on shell variable names ($HOME, $PATH) and JS template literals (${x}), which are common in technical docs and will cause KaTeX to load unnecessarily on those pages. A tighter pattern that avoids matching $WORD (uppercase/lowercase identifier-style variables) would be r'\$\$|```math|(?<![\w])\$(?![\s\d\w])' — the (?![\w]) negative lookahead drops $VAR while still catching inline math like $x^2$ when followed by a math expression character.

@tylerdave tylerdave merged commit 59172d0 into main Apr 6, 2026
13 checks passed
@tylerdave tylerdave deleted the search-stop-words branch April 6, 2026 00:34
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