We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8f6dc commit e660517Copy full SHA for e660517
src/services/MarkdownRenderer.ts
@@ -78,7 +78,9 @@ export class MarkdownRenderer {
78
}
79
80
attachHeadingsDescriptions(rawText: string) {
81
- const buildRegexp = heading => new RegExp(`##?\\s+${heading.name}`);
+ const buildRegexp = heading => {
82
+ return new RegExp(`##?\\s+${heading.name.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')}`);
83
+ };
84
85
const flatHeadings = this.flattenHeadings(this.headings);
86
if (flatHeadings.length < 1) {
0 commit comments