Skip to content

Commit

Permalink
4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arve0 committed Dec 23, 2024
1 parent 501eec1 commit 0cd968f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions markdown-it-attrs.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,16 @@ module.exports = function attributes(md, options_) {
return res.match;
});
if (match) {
pattern.transform(tokens, i, j);
if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {
// retry, may be several inline attributes
_p--;
try {
pattern.transform(tokens, i, j);
if (pattern.name === 'inline attributes' || pattern.name === 'inline nesting 0') {
// retry, may be several inline attributes
_p--;
}
} catch (error) {
// eslint-disable-next-line no-console
console.error("markdown-it-attrs: Error in pattern '".concat(pattern.name, "': ").concat(error.message));
console.error(error.stack);
}
}
p = _p;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-it-attrs",
"version": "4.3.0",
"version": "4.3.1",
"description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes",
"main": "index.js",
"license": "MIT",
Expand Down

0 comments on commit 0cd968f

Please sign in to comment.