From 21957c0b71303ef9844a9adc1d3ebb0378adce18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B0=D0=B2=D0=B8=D0=BB=D0=B8=D1=85=D0=B8=D0=BD=20?= =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A0?= =?UTF-8?q?=D1=83=D1=81=D0=BB=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D1=87?= Date: Sun, 15 Dec 2024 17:25:44 +0300 Subject: [PATCH] feat: adds `frag` snippet Resolves to React.Fragment shorthand <> --- src/snippets/html.json | 3 ++- test/fragment.ts | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/fragment.ts diff --git a/src/snippets/html.json b/src/snippets/html.json index fa2a823f..56fb2d33 100644 --- a/src/snippets/html.json +++ b/src/snippets/html.json @@ -157,5 +157,6 @@ "c": "{}", "cc:ie": "{}", - "cc:noie": "{${0}}" + "cc:noie": "{${0}}", + "frag": "{<>${0}}" } diff --git a/test/fragment.ts b/test/fragment.ts new file mode 100644 index 00000000..fed5eede --- /dev/null +++ b/test/fragment.ts @@ -0,0 +1,7 @@ +import {describe} from 'node:test'; +import {strictEqual as equal} from 'node:assert'; +import expand from '../src'; + +describe('frag', () => { + equal(expand('frag'), '<>'); +}); \ No newline at end of file