Skip to content

Commit

Permalink
fix(dgeni): heading IDs using HTML encoded string (#2940)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 authored Jul 23, 2024
1 parent 4843646 commit b0770ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/dgeni/src/processors/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import graphql from 'highlight.js/lib/languages/graphql';
import scss from 'highlight.js/lib/languages/scss';
import typescript from 'highlight.js/lib/languages/typescript';
import xml from 'highlight.js/lib/languages/xml';
import { slugify } from 'markdown-toc/lib/utils';
import { slugify } from 'markdown-toc';
import { marked } from 'marked';
import { markedHighlight } from 'marked-highlight';

Expand Down Expand Up @@ -77,7 +77,7 @@ marked.use({
},
renderer: {
heading: (text: string, level: number, raw: string) =>
`<h${level} id="${slugify(text)}">${text}</h${level}>`,
`<h${level} id="${slugify(raw)}">${text}</h${level}>`,
},
});

Expand Down

0 comments on commit b0770ef

Please sign in to comment.