Skip to content

fix: backslash in \n, \t, \r etc. no longer hidden in chat#147

Merged
dnouri merged 1 commit intomasterfrom
fix/backslash-escape-visibility
Feb 25, 2026
Merged

fix: backslash in \n, \t, \r etc. no longer hidden in chat#147
dnouri merged 1 commit intomasterfrom
fix/backslash-escape-visibility

Conversation

@dnouri
Copy link
Owner

@dnouri dnouri commented Feb 25, 2026

markdown-mode hides the backslash in escape sequences like \n, \t, \r
when markdown-hide-markup is enabled, because its regex matches
backslash + any character. CommonMark only defines escapes for ASCII
punctuation, so \n should display as \n, not just n.

Override markdown-regex-escape buffer-locally in chat mode to match
only valid CommonMark escape targets (§2.4).

Fixes #146

markdown-mode hides the backslash in escape sequences like \n, \t, \r
when markdown-hide-markup is enabled, because its regex matches
backslash + any character. CommonMark only defines escapes for ASCII
punctuation, so \n should display as \n, not just n.

Override markdown-regex-escape buffer-locally in chat mode to match
only valid CommonMark escape targets (§2.4).
@dnouri dnouri merged commit e41d32a into master Feb 25, 2026
7 of 8 checks passed
@dnouri dnouri deleted the fix/backslash-escape-visibility branch February 25, 2026 19:27
dnouri added a commit that referenced this pull request Feb 26, 2026
markdown-mode hides the backslash in escape sequences like \n, \t, \r
when markdown-hide-markup is enabled, because its regex matches
backslash + any character. CommonMark only defines escapes for ASCII
punctuation, so \n should display as \n, not just n.

Override markdown-regex-escape buffer-locally in chat mode to match
only valid CommonMark escape targets (§2.4).
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.

Improper handling of windows file names

1 participant