on master help sign in
capture markdown link text as markup.link.text (#1456)
commitb799b0d50e7848cc084d913afbdc0fb3a25c1b97 authorMichael Davis <mcarsondavis@gmail.com> dateSat 8 Jan 2022, 09:27 (5 years ago) parent5e22694
3 files changed+9−2
book/src/themes.md+3−2 runtime/queries/markdown/highlights.scm+5 theme.toml+1
book/src/themes.md+3−2
@@ -171,8 +171,9 @@ We use a similar set of scopes as
171171 - `bold`
172172 - `italic`
173173 - `link`
174− - `url`
175− - `label`
174+ - `url` - urls pointed to by links
175+ - `label` - non-url link references
176+ - `text` - url and image descriptions in links
176177 - `quote`
177178 - `raw`
178179 - `inline`
runtime/queries/markdown/highlights.scm+5
@@ -21,6 +21,11 @@
2121(link_destination) @markup.link.url
2222(link_label) @markup.link.label
2323
24+[
25+ (link_text)
26+ (image_description)
27+] @markup.link.text
28+
2429[
2530 (list_marker_plus)
2631 (list_marker_minus)
theme.toml+1
@@ -32,6 +32,7 @@ label = "honey"
3232"markup.bold" = { modifiers = ["bold"] }
3333"markup.italic" = { modifiers = ["italic"] }
3434"markup.link.url" = { fg = "silver", modifiers = ["underlined"] }
35+"markup.link.text" = "almond"
3536"markup.raw" = "almond"
3637
3738"diff.plus" = "#35bf86"