Skip to content

Commit d6438f3

Browse files
BestoraDF-DennisRehbehn
authored andcommitted
Fixing markdown parsing on settings
The custom renderer for heading on "marked" used fn(text,level). The documentation of marked gives a object of type "Heading" interface Heading { type: "heading"; raw: string; depth: number; text: string; tokens: Token[]; } Signed-off-by: Dennis Rehbehn <dennisrehbehn@googlemail.com>
1 parent 2ef74b9 commit d6438f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/settings/src/components/Markdown.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ export default {
4848
out += '>' + text + '</a>'
4949
return out
5050
}
51-
renderer.heading = (text, level) => {
52-
level = Math.min(6, level + (this.minHeading - 1))
53-
return `<h${level}>${text}</h${level}>`
51+
renderer.heading = ({ text, depth }) => {
52+
depth = Math.min(6, depth + (this.minHeading - 1))
53+
return `<h${depth}>${text}</h${depth}>`
5454
}
5555
renderer.image = function(href, title, text) {
5656
if (text) {

0 commit comments

Comments
 (0)