From b56cf1a3526fa6996e1abab1bde3957c61b93d88 Mon Sep 17 00:00:00 2001 From: liam Date: Fri, 22 May 2026 18:40:13 -0400 Subject: [PATCH] grammars: Highlight markdown code spans in tables (#57506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves https://github.com/zed-industries/zed/issues/57501 This diff fixes Markdown inline syntax highlighting inside pipe table cells. The block Markdown parser represents table content as `pipe_table_cell` nodes rather than `inline` nodes, so Zed’s existing `markdown-inline` injection ran for paragraph text but skipped code spans inside tables. With this change, table cells also inject `markdown-inline`, allowing existing inline highlighting to handle code spans consistently between paragraph text and table cells. | Before | After | | --- | --- | | Before screenshot | After screenshot | Release Notes: - Fixed Markdown inline code highlighting in table cells. --- crates/grammars/src/markdown/injections.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/grammars/src/markdown/injections.scm b/crates/grammars/src/markdown/injections.scm index 46717b28a9..1b803b708e 100644 --- a/crates/grammars/src/markdown/injections.scm +++ b/crates/grammars/src/markdown/injections.scm @@ -6,6 +6,9 @@ ((inline) @injection.content (#set! injection.language "markdown-inline")) +((pipe_table_cell) @injection.content + (#set! injection.language "markdown-inline")) + ((html_block) @injection.content (#set! injection.language "html"))