-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support markdown syntax highlighting (#112)
* feat: support markdown syntax highlighting Add's support for kusto syntax highlighting in markdown fenced code blocks Valid language names are kusto, kql, csl Resolves: #93 * feat: add kusto logo to file Add a dark mode variant with higher contrast * fix: support csl fence block
- Loading branch information
1 parent
1b15e80
commit db77b2b
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
kusto-syntax-highlighting/syntaxes/kusto-markdown-codeblock.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"fileTypes": [], | ||
"injectionSelector": "L:text.html.markdown", | ||
"patterns": [ | ||
{ | ||
"include": "#fenced_code_block_kusto" | ||
} | ||
], | ||
"repository": { | ||
"fenced_code_block_kusto": { | ||
"name": "markup.fenced_code.block.markdown", | ||
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(kusto|kql|csl)(\\s+[^`~]*)?$)", | ||
"end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)", | ||
"beginCaptures": { | ||
"3": { | ||
"name": "punctuation.definition.markdown" | ||
}, | ||
"4": { | ||
"name": "fenced_code.block.language.markdown" | ||
}, | ||
"5": { | ||
"name": "fenced_code.block.language.attributes.markdown" | ||
} | ||
}, | ||
"endCaptures": { | ||
"3": { | ||
"name": "punctuation.definition.markdown" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"begin": "(^|\\G)(\\s*)(.*)", | ||
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", | ||
"contentName": "meta.embedded.block.kusto", | ||
"patterns": [ | ||
{ | ||
"include": "source.kusto" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"scopeName": "markdown.kusto.codeblock" | ||
} |