Closed ken1kob closed 2 years ago
The following is an example code fixing this bug.
// check header
line = line.replace(/\s+#+\s*$/, '');
// START OF EXAMPLE
// remove HTML elements
while (true) {
let x = line.replace(/<.*?>([^<>]*?)<\/.*?>/, '$1');
if (x == line) break
line = x
}
// remove math
while (true) {
let x = line.replace(/\$[^\$]+\$/, '');
if (x == line) break
line = x
}
// END OF EXAMPLE
const match = line.match(/^(#+)\s(?:\[(.*)\]|(.*))/);
@ken1kob How did you put the outline to the left side?~~
@ken1kob How did you put the outline to the left side?~~
Menu: View -> Change application layout
As follows, headings with html tags and headings with math expressions are incorrectly displayed. Besides, they do not work as clickable internal links.
They should be displayed as follows in the OUTLINE panel. Html tags should be removed, but their contents should be remained. Math expressions and their contents should be removed.