From 9ada5f70f98d51e9e3e76018e783b39fd1cd28f7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Oct 2022 13:00:07 +0200 Subject: feat: markdown table highlights and inline --- queries/markdown/highlights.scm | 8 ++++++++ queries/markdown/injections.scm | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm index 914c34a4..70c35b39 100644 --- a/queries/markdown/highlights.scm +++ b/queries/markdown/highlights.scm @@ -19,6 +19,14 @@ (fenced_code_block) ] @text.literal +(pipe_table_header (pipe_table_cell) @text.title) +[ + (pipe_table_row) + (pipe_table_delimiter_row) + (pipe_table_header) +] "|" @punctuation.special +(pipe_table_delimiter_cell) @punctuation.special + [ (fenced_code_block_delimiter) ] @punctuation.delimiter diff --git a/queries/markdown/injections.scm b/queries/markdown/injections.scm index 465cccef..2310ee42 100644 --- a/queries/markdown/injections.scm +++ b/queries/markdown/injections.scm @@ -9,4 +9,7 @@ ((minus_metadata) @yaml (#offset! @yaml 1 0 -1 0)) ((plus_metadata) @toml (#offset! @toml 1 0 -1 0)) -((inline) @markdown_inline (#exclude_children! @markdown_inline)) +([ + (inline) + (pipe_table_cell) + ] @markdown_inline (#exclude_children! @markdown_inline)) -- cgit v1.2.3