Skip to content

Ignore punctuation when matching a word in the zen command - #3563

Merged
ChrisLovering merged 1 commit into
mainfrom
zen-ignore-punctuation
Oct 6, 2026
Merged

ChrisLovering merged 1 commit into
mainfrom
zen-ignore-punctuation

Conversation

@ChrisLovering

Copy link
Copy Markdown
Member

!zen <word> first looks for a line containing that exact word, but the check included any punctuation attached to the word. So !zen ugly didn't match "ugly." and fell through to the fuzzy search instead.

The check now compares only the word itself. Apostrophes inside words are kept, so "aren't" and "let's" still match as whole words.

Adds a test covering words next to punctuation.

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

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

LGTM

@ChrisLovering
ChrisLovering merged commit ab21eef into main Oct 6, 2026
5 checks passed
@ChrisLovering
ChrisLovering deleted the zen-ignore-punctuation branch October 6, 2026 19: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.

3 participants