mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
grammars: Highlight markdown code spans in tables (#57506)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped
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 | | --- | --- | | <img width="500" alt="Before screenshot" src="https://github.com/user-attachments/assets/bdb75c18-9f20-4f3c-bea6-946194098db6" /> | <img width="500" alt="After screenshot" src="https://github.com/user-attachments/assets/23ae7bc5-5208-4dc7-ab6f-d07404aeae06" /> | Release Notes: - Fixed Markdown inline code highlighting in table cells.
This commit is contained in:
parent
de529b5677
commit
450206e49d
1 changed files with 3 additions and 0 deletions
|
|
@ -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"))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue