Skip to content

Commit 0cd968f

Browse files
committed
4.3.1
1 parent 501eec1 commit 0cd968f

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

markdown-it-attrs.browser.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,16 @@ module.exports = function attributes(md, options_) {
8686
return res.match;
8787
});
8888
if (match) {
89-
pattern.transform(tokens, i, j);
90-
if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {
91-
// retry, may be several inline attributes
92-
_p--;
89+
try {
90+
pattern.transform(tokens, i, j);
91+
if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {
92+
// retry, may be several inline attributes
93+
_p--;
94+
}
95+
} catch (error) {
96+
// eslint-disable-next-line no-console
97+
console.error("markdown-it-attrs: Error in pattern '".concat(pattern.name, "': ").concat(error.message));
98+
console.error(error.stack);
9399
}
94100
}
95101
p = _p;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markdown-it-attrs",
3-
"version": "4.3.0",
3+
"version": "4.3.1",
44
"description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes",
55
"main": "index.js",
66
"license": "MIT",

0 commit comments

Comments
 (0)