Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(Fish) Fix fish single quote backslash escape#3138

Open
987cj wants to merge 6 commits into
pygments:masterfrom
Trung6405:fix/fish-squote-escape
Open

(Fish) Fix fish single quote backslash escape#3138
987cj wants to merge 6 commits into
pygments:masterfrom
Trung6405:fix/fish-squote-escape

Conversation

@987cj

@987cj 987cj commented May 19, 2026

Copy link
Copy Markdown

Fixes #2821

Implements a fix for backslash quote escapes, and a small snippet test for them.

In regards to the ending backslashes, I’ve made the following changes:
'abc\\' works (backslash escape)
'abc\' doesn’t work (registers as a quote escape, string not properly closed
'abc\'' works (properly escaped quote, string closed)

This is tested within the code snippet : )

This works by recognising whether a quote is escaped, rather than recognising all escape characters ('abc\\\' registers as a full string, despite the escapes not actually closing the string properly). As fish has some settings for handling escape characters, I felt it best to do it this way so it doesn't accidentally break some functionality I'm not aware of.

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.

Single Quote Escaping Inside Single-Quoted String in Fish Doesn't Work

1 participant