From ac775c2f8c24b5396ba2a408bcb56218efae3967 Mon Sep 17 00:00:00 2001 From: Shiv Jha-Mathur Date: Sat, 6 Nov 2021 22:46:01 +0530 Subject: [PATCH] fix(remark-kbd-nested)!: freeze `fromMarkdown` --- packages/remark-kbd-nested/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/remark-kbd-nested/src/index.ts b/packages/remark-kbd-nested/src/index.ts index 8ce791a..c75cded 100644 --- a/packages/remark-kbd-nested/src/index.ts +++ b/packages/remark-kbd-nested/src/index.ts @@ -3,7 +3,7 @@ import type { Plugin } from "unified"; import type { Root } from "mdast"; import type { Extension as FromMarkdownExtension } from "mdast-util-from-markdown"; -const fromMarkdown: FromMarkdownExtension = { +const fromMarkdown: FromMarkdownExtension = Object.freeze({ canContainEols: ["keyboard"], enter: { keyboardSequence: function (token) { @@ -39,7 +39,7 @@ const fromMarkdown: FromMarkdownExtension = { this.exit(token); }, }, -}; +}); export const remarkKbdNested: Plugin = function ( options: IOptions = {},