mirror of
https://github.com/yuzu-emu/shared-hugo-scripts
synced 2024-11-22 04:13:39 +00:00
Merge pull request #4 from yuzu-emu/CaptV0rt3x-patch-1
Fix decoded ampersands
This commit is contained in:
commit
6607aac2f2
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ fs.readdir(inputDirectory, (err, items) => {
|
|||
cleanData = cleanData.replace(/\[\[(.*)\]\]/g, (match, p1) => {
|
||||
return `[${p1}](${url(p1)})`;
|
||||
});
|
||||
|
||||
// Replace decoded & -> &
|
||||
cleanData = cleanData.replace(/&/g, "&");
|
||||
|
||||
// Create the new markdown header for Hugo.
|
||||
const newFileContents = `+++\r\ntitle = "${title}"\r\ndate = "${modified.toISOString()}"\r\n+++\r\n\r\n${cleanData}\r\n`;
|
||||
|
|
Loading…
Reference in a new issue