diff --git a/markdown-it-attrs.browser.js b/markdown-it-attrs.browser.js index 0e1b436..3c464ee 100644 --- a/markdown-it-attrs.browser.js +++ b/markdown-it-attrs.browser.js @@ -23,7 +23,7 @@ module.exports = function attributes(md) { }); if (match) { pattern.transform(tokens, i, j); - if (pattern.name === 'inline attributes') { + if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') { // retry, may be several inline attributes p--; } @@ -461,7 +461,10 @@ module.exports = [{ type: 'inline', children: [{ position: -1, - content: utils.hasCurly('end') + content: utils.hasCurly('end'), + type: function type(t) { + return t !== 'code_inline'; + } }] }], transform: function transform(tokens, i, j) { diff --git a/package-lock.json b/package-lock.json index 78f3210..c0877cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "markdown-it-attrs", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 88f17b1..73d54eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-it-attrs", - "version": "1.2.0", + "version": "1.2.1", "description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes", "main": "index.js", "license": "MIT",