Skip to content

Commit

Permalink
add syntax highlight for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kortina committed Feb 19, 2020
1 parent 787ac6b commit 9f03a3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions syntaxes/notes.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@
}
},
{
"match": "\\bkortina\\b",
"name": "text.markdown.notes.kortina"
"match": "(\\#)([\\w\\-\\_]+)",
"name": "text.markdown.notes.tag",
"captures": {
"1": {
"name": "punctuation.definition.tag"
},
"2": {
"name": "support.function.text.markdown.notes.tag.title"
}
}
}
],
"scopeName": "text.markdown.notes"
Expand Down
4 changes: 2 additions & 2 deletions test/test.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# test
# test #tag

- [[test]] - no extension
- [[test.md]] - extension, exists
Expand All @@ -7,4 +7,4 @@
- [[./sub/sub.md]] - relative path, exists
- [[sub.md]] - exists in sub directory

#tag
#tag #tag2

0 comments on commit 9f03a3e

Please sign in to comment.