Skip to content

Support escaping snippet spaces#2223

Draft
FireChickenProductivity wants to merge 13 commits into
talonhub:mainfrom
FireChickenProductivity:escape-spaces
Draft

Support escaping snippet spaces#2223
FireChickenProductivity wants to merge 13 commits into
talonhub:mainfrom
FireChickenProductivity:escape-spaces

Conversation

@FireChickenProductivity

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +285 to +290
# treat double backslash as escaped backslash
# treat backslash space as space
matches = [m for m in re.finditer(ESCAPED_SPACE_EXPRESSION, body)]
for match in reversed(matches):
body = body[: match.end() - 1] + body[match.end() :]
return body.replace("\\\\", "\\")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From the community backlog session — consider replacing this with a couple string replacements that replace the escaped backslash with a rarely used/non-printable Unicode character. If this character is in use in the snippet, it is fine to reject it.

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.

2 participants