Update footnote regex to handle footnotes with spaces

This commit is contained in:
Sebastian Martinez
2024-03-04 16:35:22 +01:00
committed by Rūdolfs Ošiņš
parent 18ef797f41
commit 16e858bd7a
3 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ const footnoteReferenceMarkedExtension = {
renderer: (token: Tokens.Generic): string =>
`<sup class="txt-tiny footnote-ref" id="${referencePrefix}:${token.text}"><a href="#${footnotePrefix}:${token.text}">[${token.text}]</a></sup>`,
};
const footnoteMatch = /^\[\^([^\]]+)\]:\s([\S]*)/;
const footnoteMatch = /^\[\^([^\]]+)\]:\s([\S].*)/;
const footnoteMarkedExtension = {
name: "footnote",
level: "block",