disable newly deprecated stuff
This commit is contained in:
parent
4274045fca
commit
e40db445a5
@ -30,6 +30,8 @@ export async function render_markdown_to_html(markdown: string, options: Markdow
|
||||
async: true,
|
||||
breaks: options.breaks || false,
|
||||
renderer: create_renderer(options),
|
||||
mangle: false,
|
||||
headerIds: false,
|
||||
};
|
||||
|
||||
marked.use({
|
||||
|
@ -28,13 +28,8 @@ 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, slugger) {
|
||||
return function(orig_text: string, level: 1 | 2 | 3 | 4 | 5 | 6, raw: string) {
|
||||
let { text, id, html_attrs } = parse_attributes(raw);
|
||||
|
||||
if (! id) {
|
||||
id = slugger.slug(text);
|
||||
html_attrs.push(`id="${id}"`);
|
||||
}
|
||||
|
||||
return `
|
||||
<h${level} ${html_attrs.join(' ')}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user