mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-31 23:38:45 +00:00
Auto merge of #15102 - Veykril:markdown-inject, r=Veykril
Remove markdown injection for block comments Closes https://github.com/rust-lang/rust-analyzer/issues/15091 I tried making it work but it doesn't seem possible, as the `*` of the closing `*/` sequence gets eaten by the markdown grammar no matter what.
This commit is contained in:
commit
fe43be5d9b
2 changed files with 4 additions and 17 deletions
|
@ -1648,7 +1648,7 @@
|
||||||
"path": "ra_syntax_tree.tmGrammar.json"
|
"path": "ra_syntax_tree.tmGrammar.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"scopeName": "rustdoc.markdown.injection",
|
"scopeName": "source.rustdoc.markdown.injection",
|
||||||
"path": "rustdoc.markdown.injection.tmGrammar.json",
|
"path": "rustdoc.markdown.injection.tmGrammar.json",
|
||||||
"injectTo": [
|
"injectTo": [
|
||||||
"source.rust"
|
"source.rust"
|
||||||
|
|
|
@ -1,30 +1,17 @@
|
||||||
{
|
{
|
||||||
"scopeName": "rustdoc.markdown.injection",
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||||
|
"scopeName": "source.rustdoc.markdown.injection",
|
||||||
"injectionSelector": "L:source.rust",
|
"injectionSelector": "L:source.rust",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"include": "#doc-comment-line"
|
"include": "#doc-comment-line"
|
||||||
},
|
|
||||||
{
|
|
||||||
"include": "#doc-comment-block"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"doc-comment-line": {
|
"doc-comment-line": {
|
||||||
"name": "comment.line.documentation.rust",
|
"name": "comment.line.documentation.rust",
|
||||||
"begin": "^\\s*//(/|!)",
|
"begin": "^\\s*//(/|!)",
|
||||||
"while": "^\\s*//(/|!)",
|
"end": "$",
|
||||||
"contentName": "meta.embedded.block.markdown",
|
|
||||||
"patterns": [
|
|
||||||
{
|
|
||||||
"include": "text.html.markdown"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"doc-comment-block": {
|
|
||||||
"name": "comment.block.documentation.rust",
|
|
||||||
"begin": "/\\*(\\*|!)",
|
|
||||||
"end": "\\s*\\*/",
|
|
||||||
"contentName": "meta.embedded.block.markdown",
|
"contentName": "meta.embedded.block.markdown",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue