Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Nov 9, 2024
1 parent 59f4ee5 commit edecab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions spec/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('marked-gfm-heading-id', () => {
# foo 1
# foo
# foo
`;
const markdownTwo = `
Expand Down Expand Up @@ -207,7 +207,7 @@ describe('marked-gfm-heading-id', () => {
# foo 1
# foo
# foo
`;
const markdownTwo = `
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('marked-gfm-heading-id', () => {
# foo 1
# foo
# foo
`;
const markdownTwo = `
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function gfmHeadingId({ prefix = '', globalSlugs = false } = {}) {
renderer: {
heading({ tokens, depth }) {
const text = this.parser.parseInline(tokens);
const raw = unescape(this.parser.parseInline(tokens, this.parser.textRenderer))
const raw = unescape(text)
.trim()
.replace(/<[!\/a-z].*?>/gi, '');
const level = depth;
Expand Down

0 comments on commit edecab7

Please sign in to comment.