From 836bcf5f6f530558e539a7a26178d80c1a2bccab Mon Sep 17 00:00:00 2001 From: NothingIsLost Date: Fri, 19 Nov 2021 07:59:47 -0800 Subject: [PATCH] increase max icon shortcode length --- package.json | 2 +- src/hmd-fold-emoji.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9e80a3d..52d4124 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "author": "NothingIslost <[@nothingislost](https://github.com/nothingislost)>", "license": "MIT", "devDependencies": { - "@aidenlx/obsidian-icon-shortcodes": "^0.4.0", + "@aidenlx/obsidian-icon-shortcodes": "^0.5.1", "@giotramu/prettier-config": "^1.1.2", "@rollup/plugin-commonjs": "^15.1.0", "@rollup/plugin-json": "^4.1.0", diff --git a/src/hmd-fold-emoji.js b/src/hmd-fold-emoji.js index 00aa141..53cb940 100644 --- a/src/hmd-fold-emoji.js +++ b/src/hmd-fold-emoji.js @@ -3,6 +3,7 @@ // // DESCRIPTION: Fold and render emoji :smile: // +// eslint-disable-next-line @typescript-eslint/no-var-requires const { getApi } = require("@aidenlx/obsidian-icon-shortcodes"); (function (mod) { //[HyperMD] UMD patched! @@ -51,7 +52,7 @@ const { getApi } = require("@aidenlx/obsidian-icon-shortcodes"); name += t.string; } // filter text that is too long to be shortcode - if (name.length > 20) return; + if (name.length > 55) return; // filter using common shortcode pattern if (!EmojiPattern.test(name)) return;