fix(metadata): Restore dollar signs and tremas. (#730)

Closes #626

Co-authored-by: Estevão Soares dos Santos <estevao.santos@gmail.com>
This commit is contained in:
Vladimir Vuksanovic 2022-02-24 01:03:20 +01:00 committed by GitHub
parent 3fd1ea6d7f
commit ebc730c0a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 0 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -22,6 +22,11 @@ showdown.subParser('makehtml.metadata', function (text, options, globals) {
// double quotes
.replace(/"/g, '&quot;');
// Restore dollar signs and tremas
content = content
.replace(/¨D/g, '$$')
.replace(/¨T/g, '¨');
content = content.replace(/\n {4}/g, ' ');
content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) {
globals.metadata.parsed[key] = value;