Skip to content

Commit

Permalink
fix #1408
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Oct 26, 2020
1 parent 8aeaf89 commit 791f1b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/render/tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function tree(toc, tpl = '<ul class="app-sub-sidebar">{inner}</ul>') {
let innerHTML = '';
let title = '';
toc.forEach(node => {
title = node.title.replace(/(<\/?img.*?>)/g, '');
title = node.title.replace(/(<([^>]+)>)/g, '');
innerHTML += `<li><a class="section-link" href="${node.slug}" title="${title}">${node.title}</a></li>`;
if (node.children) {
innerHTML += tree(node.children, tpl);
Expand Down

0 comments on commit 791f1b6

Please sign in to comment.