-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
Description
Describe the feature
Omit the pattern <tag></tag> from text previews.
Could be done behind the scenes or added as an option.
First Line is Title performs this successfully. Here's its code:
// Remove HTML tags (all tags with opening and closing pairs) - handle nested tags
if (settings.omitHtmlTags) {
let previousLine = '';
while (line !== previousLine) {
previousLine = line;
line = line.replace(/<([a-zA-Z][a-zA-Z0-9]*)\b[^>]*>(.*?)<\/\1>/g, '$2');
}
}
Why would this be useful?
I often rely on HTML tags like <u> or <center> in notes because the markdown spec doesn't support underline and align center. This results in unsightly HTML tags previews being shown by the plugin.