From eed6388b1044eaac75278c047cdd7bf7d3cf107f Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Thu, 5 Sep 2024 15:28:53 +0800 Subject: [PATCH] fix ultisnipsParser no description --- src/ultisnipsParser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ultisnipsParser.ts b/src/ultisnipsParser.ts index 824eb0b..d77555d 100644 --- a/src/ultisnipsParser.ts +++ b/src/ultisnipsParser.ts @@ -90,6 +90,7 @@ export default class UltiSnipsParser { try { let body = preLines.join('\n') let ms = first.match(/^(.+?)(?:\s+(?:"(.*?)")?(?:\s+"(.*?)")?(?:\s+(\w+))?)?\s*$/) + let description = ms[2] || ''; let option = ms[4] || '' let trigger = getTriggerText(ms[1], option.includes('r')) let regex: RegExp = null @@ -123,7 +124,7 @@ export default class UltiSnipsParser { autoTrigger: option.indexOf('A') !== -1, lnum: lnum - preLines.length - 2, triggerKind: getTriggerKind(option), - description: ms == null ? '' : ms[2], + description, regex, body, priority