From 35aa36a65b20bd023a65918cd8b961dd52f0be95 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 1 Jul 2026 10:07:31 +0200 Subject: [PATCH] feat(markdown): conceal backslash in escapes --- runtime/queries/markdown_inline/highlights.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/runtime/queries/markdown_inline/highlights.scm b/runtime/queries/markdown_inline/highlights.scm index 5fb9e911d..a0cafee67 100644 --- a/runtime/queries/markdown_inline/highlights.scm +++ b/runtime/queries/markdown_inline/highlights.scm @@ -10,10 +10,15 @@ (shortcut_link (link_text) @nospell) -[ - (backslash_escape) - (hard_line_break) -] @string.escape +; Conceal backslash in backslash escapes +((backslash_escape) @conceal + (#offset! @conceal 0 0 0 -1) + (#set! conceal "")) + +; Conceal backslash in hard line breaks +((hard_line_break + "\\" @conceal) + (#set! conceal "")) ; Conceal codeblock and text style markers ([