cleanup
This commit is contained in:
		@@ -41,19 +41,18 @@ export function breadcrumb_nav_ext(renderer: marked.Renderer, opts: MarkdownOpti
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		renderer(token: BreadcrumbNavToken) {
 | 
							renderer(token: BreadcrumbNavToken) {
 | 
				
			||||||
			return `<nav aria-label="breadcrumbs" ${token.attrs.html_attrs.join(' ')}>\n`
 | 
								return `<nav aria-label="breadcrumbs" ${token.attrs.html_attrs.join(' ')}>\n`
 | 
				
			||||||
				+ `\t<ol typeof="https://schema.org/BreadcrumbList">\n`
 | 
									+ `\t<ol>\n`
 | 
				
			||||||
				+ '\t\t'
 | 
									+ '\t\t'
 | 
				
			||||||
					+ token.items.map((tokens, index) =>{ 
 | 
										+ token.items.map((tokens, index) =>{ 
 | 
				
			||||||
						let item = '<li property="itemListElement" typeof="https://schema.org/ListItem">\n';
 | 
											let item = '<li>\n';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						if (index) {
 | 
											if (index) {
 | 
				
			||||||
							item += '\t\t\t<span class="separator" aria-hidden="true">/</span>\n';
 | 
												item += '\t\t\t<span class="separator" aria-hidden="true">/</span>\n';
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						item += `\t\t\t<span property="name">${this.parser.parseInline(tokens, renderer)}</span>\n`;
 | 
											item += `\t\t\t${this.parser.parseInline(tokens, renderer)}\n`;
 | 
				
			||||||
						item += `\t\t\t<meta property="position" content="${index + 1}">\n`;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
						return item +  + '\t\t</li>';
 | 
											return item + '\t\t</li>';
 | 
				
			||||||
					}).join('\n\t\t')
 | 
										}).join('\n\t\t')
 | 
				
			||||||
				+ '\n'
 | 
									+ '\n'
 | 
				
			||||||
				+ `\t</ol>\n`
 | 
									+ `\t</ol>\n`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,8 +9,5 @@ export function sanitize_html(html: string, custom_elements?: CustomElementHandl
 | 
				
			|||||||
	const dom_purify = createDOMPurify(window as any as Window);
 | 
						const dom_purify = createDOMPurify(window as any as Window);
 | 
				
			||||||
	return dom_purify.sanitize(html, {
 | 
						return dom_purify.sanitize(html, {
 | 
				
			||||||
		CUSTOM_ELEMENT_HANDLING: custom_elements,
 | 
							CUSTOM_ELEMENT_HANDLING: custom_elements,
 | 
				
			||||||
		ALLOWED_TAGS: ['meta'],
 | 
					 | 
				
			||||||
		ALLOWED_ATTR: ['typeof', 'property', 'content'],
 | 
					 | 
				
			||||||
		ADD_URI_SAFE_ATTR: ['typeof']
 | 
					 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user