From 3fc08d64c95cf0a6c31c4848a96f27890d3c891b Mon Sep 17 00:00:00 2001 From: valentine195 <38669521+valentine195@users.noreply.github.com> Date: Fri, 20 Aug 2021 08:59:17 -0400 Subject: [PATCH] 6.2.7 - Fixed issue where accents could cause syntax highlighting to not work --- manifest.json | 2 +- package.json | 2 +- src/main.ts | 5 ++++- versions.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index dd5ca9f..4403c17 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-admonition", "name": "Admonition", - "version": "6.2.6", + "version": "6.2.7", "minAppVersion": "0.11.0", "description": "Admonition block-styled content for Obsidian.md", "author": "Jeremy Valentine", diff --git a/package.json b/package.json index 5828d6f..e1f7644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-admonition", - "version": "6.2.6", + "version": "6.2.7", "description": "Admonition block-styled content for Obsidian.md", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index d7f24b5..324b42b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -630,8 +630,11 @@ title: types.forEach((type) => { if (this.data.syntaxHighlight) { /** Process from @deathau's syntax highlight plugin */ + const [, cmPatchedType] = `${type}`.match( + /^([\w+#-]*)[^\n`]*$/ + ); window.CodeMirror.defineMode( - `ad-${type}`, + `ad-${cmPatchedType}`, (config, options) => { return window.CodeMirror.getMode({}, "hypermd"); } diff --git a/versions.json b/versions.json index bec015a..0f28ce7 100644 --- a/versions.json +++ b/versions.json @@ -11,5 +11,5 @@ "4.3.1": "0.12.0", "4.4.2": "0.12.2", "5.0.3": "0.12.2", - "6.2.6": "0.12.4" + "6.2.7": "0.12.4" } \ No newline at end of file