Skip to content

fix(parser): unescape \/ in Wait regexes before compile#767

Open
Krshs90 wants to merge 1 commit into
charmbracelet:mainfrom
Krshs90:fix/wait-regex-escape-592
Open

fix(parser): unescape \/ in Wait regexes before compile#767
Krshs90 wants to merge 1 commit into
charmbracelet:mainfrom
Krshs90:fix/wait-regex-escape-592

Conversation

@Krshs90

@Krshs90 Krshs90 commented Jul 17, 2026

Copy link
Copy Markdown

Fixes #592. Go's standard
egexp\ library does not support escaping /\ as \/, returning an \invalid escape sequence: /\ error. Since \�hs\ uses /\ as the delimiter for regexes in \Wait\ commands, users who wish to include a literal /\ in their regex must escape it as \/, but this causes the parser to fail compilation. This PR replaces all \/\ with /\ before compiling the regex pattern, solving the issue without breaking backslash escapes.

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.

Impossible to escape / in Wait regex

1 participant