diff options
author | Michael Davis | 2022-01-08 15:27:50 +0000 |
---|---|---|
committer | GitHub | 2022-01-08 15:27:50 +0000 |
commit | b799b0d50e7848cc084d913afbdc0fb3a25c1b97 (patch) | |
tree | 68540b152c17e5453313e9f7fc7bb6b47aa6e4a5 | |
parent | 5e2269486598645a6e9511ea25f87b3609511d77 (diff) |
capture markdown link text as markup.link.text (#1456)
-rw-r--r-- | book/src/themes.md | 5 | ||||
-rw-r--r-- | runtime/queries/markdown/highlights.scm | 5 | ||||
-rw-r--r-- | theme.toml | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/book/src/themes.md b/book/src/themes.md index 7474122f..29d3926e 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -171,8 +171,9 @@ We use a similar set of scopes as - `bold` - `italic` - `link` - - `url` - - `label` + - `url` - urls pointed to by links + - `label` - non-url link references + - `text` - url and image descriptions in links - `quote` - `raw` - `inline` diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index a0bd3462..f12254e9 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -22,6 +22,11 @@ (link_label) @markup.link.label [ + (link_text) + (image_description) +] @markup.link.text + +[ (list_marker_plus) (list_marker_minus) (list_marker_star) @@ -32,6 +32,7 @@ label = "honey" "markup.bold" = { modifiers = ["bold"] } "markup.italic" = { modifiers = ["italic"] } "markup.link.url" = { fg = "silver", modifiers = ["underlined"] } +"markup.link.text" = "almond" "markup.raw" = "almond" "diff.plus" = "#35bf86" |