on master help sign in
accept empty snippet regex replace elements
47420dbPascal Kuthe
helix-lsp/src/snippet.rs+2−2
@@ -311,9 +311,9 @@ mod parser {
311 seq!(
311 seq!(
312 "/",
312 "/",
313 // TODO parse as ECMAScript and convert to rust regex
313 // TODO parse as ECMAScript and convert to rust regex
314− non_empty(text(&['/'], &['/'])),
314+ text(&['/'], &['/']),
315 "/",
315 "/",
316− one_or_more(choice!(
316+ zero_or_more(choice!(
317 format(),
317 format(),
318 // text doesn't parse $, if format fails we just accept the $ as text
318 // text doesn't parse $, if format fails we just accept the $ as text
319 map("$", |_| FormatItem::Text("$".into())),
319 map("$", |_| FormatItem::Text("$".into())),