Skip to content

Commit

Permalink
4.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
arve0 committed Dec 30, 2021
1 parent ec999bf commit 4bf86f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions markdown-it-attrs.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ function test(tokens, i, t) {

};
var ii = t.shift !== undefined ? i + t.shift : t.position;

if (t.shift !== undefined && ii < 0) {
// we should never shift to negative indexes (rolling around to back of array)
return res;
}

var token = get(tokens, ii); // supports negative ii

if (token === undefined) {
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.2",
"version": "4.1.3",
"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 4bf86f3

Please sign in to comment.