Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/snippets/parser.rs')
-rw-r--r--helix-core/src/snippets/parser.rs21
1 files changed, 4 insertions, 17 deletions
diff --git a/helix-core/src/snippets/parser.rs b/helix-core/src/snippets/parser.rs
index 74e940da..9c224396 100644
--- a/helix-core/src/snippets/parser.rs
+++ b/helix-core/src/snippets/parser.rs
@@ -1,6 +1,6 @@
/*!
-A parser for LSP/VSCode style snippet syntax
-See <https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax>.
+A parser for LSP/VSCode style snippet syntax see
+<https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax>
``` text
any ::= tabstop | placeholder | choice | variable | text
@@ -361,20 +361,7 @@ mod test {
Text(")".into()),
]),
parse("match(${1:Arg1})")
- );
- // The `$0` tabstop should not have placeholder text. The parser should handle this case
- // normally and then the placeholder text should be discarded during elaboration.
- assert_eq!(
- Ok(vec![
- Text("sizeof(".into()),
- Placeholder {
- tabstop: 0,
- value: vec![Text("expression-or-type".into())],
- },
- Text(")".into()),
- ]),
- parse("sizeof(${0:expression-or-type})")
- );
+ )
}
#[test]
@@ -717,7 +704,7 @@ mod test {
}],
);
- // invalid regex TODO: reneable tests once we actually parse this regex flavor
+ // invalid regex TODO: reneable tests once we actually parse this regex flavour
// assert_text(
// "${foo/([A-Z][a-z])/format/GMI}",
// "${foo/([A-Z][a-z])/format/GMI}",