shortcuts use templates

This commit is contained in:
zadam
2022-11-28 23:39:23 +01:00
parent a459230aa9
commit eecfce3cc9
8 changed files with 198 additions and 97 deletions

View File

@@ -333,7 +333,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
getPreprocessedData() {
const str = this.textEditor.getData()
.replace(/<a[^>]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1")
.replace(/<a[^>]+href="(#[A-Za-z0-9_/]*)"[^>]*>[^<]*<\/a>/g, "$1")
.replace(/&nbsp;/g, " "); // otherwise .text() below outputs non-breaking space in unicode
return $("<div>").html(str).text();