Skip to content

Commit

Permalink
4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arve0 committed Aug 11, 2024
1 parent 22c7d3a commit 6323885
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions markdown-it-attrs.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,11 @@ module.exports = function (options) {
var content = token.content;
var attrs = utils.getAttrs(content, content.lastIndexOf(options.leftDelimiter), options);
var ii = i + 1;
while (tokens[ii + 1] && tokens[ii + 1].nesting === -1) {
ii++;
}
do {
if (tokens[ii] && tokens[ii].nesting === -1) {
break;
}
} while (ii++ < tokens.length);
var openingToken = utils.getMatchingOpeningToken(tokens, ii);
utils.addAttrs(attrs, openingToken);
var trimmed = content.slice(0, content.lastIndexOf(options.leftDelimiter));
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.1.6",
"version": "4.2.0",
"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 6323885

Please sign in to comment.