diff --git a/changelog.md b/changelog.md index 2373f5b..8d337ff 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ ## CHANGELOG -### [2.7.3]() on June 06, 2021 +### [2.7.4]() on June 06, 2021 * Table of Content links bug removed. * macros settings bug removed. diff --git a/extension.js b/extension.js index 1fab0b7..d2a22d4 100644 --- a/extension.js +++ b/extension.js @@ -210,12 +210,12 @@ exports.activate = function activate(context) { const tm = require('markdown-it-texmath'); const delimiters = JSON.parse(JSON.stringify(ext.cfg('delimiters'))) || 'dollars'; // wondering why this JSON stuff is necessary ... const katexOptions = JSON.parse(JSON.stringify(ext.cfg('katexoptions') || '')) || {}; - const macros = ext.loadMacros(); + const macros = katexOptions.macros = ext.loadMacros(); const outerSpace = ext.cfg('outerspace') || false; const options = { "engine": require('katex'), "delimiters": delimiters, "outerSpace": outerSpace, - "katexOptions": macros && !katexOptions.macros ? Object.assign(katexOptions, macros) : katexOptions + "katexOptions": katexOptions }; (ext.mdit = md).use(tm, options); diff --git a/package.json b/package.json index ce320ff..2d8ef77 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Markdown+Math", "description": "LaTeX Math for Markdown ... with macros and more", "icon": "img/icon.png", - "version": "2.7.3", + "version": "2.7.4", "author": "Stefan Goessner", "publisher": "goessner", "keywords": [