diff --git a/src/renderer.ts b/src/renderer.ts index 479e9a7..6e9c8da 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -29,14 +29,14 @@ export function create_renderer(opts: MarkdownOptions) { function heading(renderer: marked.Renderer, opts: MarkdownOptions) { return function(orig_text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string) { - let { text, id, html_attrs } = parse_attributes(raw); + let { text, id, html_attrs } = parse_attributes(orig_text); if (id) { text += `\n` + `\n\t\t${icons.link}` + `\n\t\tSection titled ${text}` + `\n\t`; } - + return `\n\n\t${text}\n`; }; }