Skip to content

Commit

Permalink
capture markdown link text as markup.link.text (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored Jan 8, 2022
1 parent 5e22694 commit b799b0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions book/src/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
5 changes: 5 additions & 0 deletions runtime/queries/markdown/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
(link_destination) @markup.link.url
(link_label) @markup.link.label

[
(link_text)
(image_description)
] @markup.link.text

[
(list_marker_plus)
(list_marker_minus)
Expand Down
1 change: 1 addition & 0 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b799b0d

Please sign in to comment.