diff --git a/index.js b/index.js index 61dd748..d41d8a3 100644 --- a/index.js +++ b/index.js @@ -82,7 +82,9 @@ articles.forEach(article => { const article_output_path = path.join(config.build.output_dir, article_attributes.url, "index.html"); // Generate article output - var article_output = article_html.replace(/[äöüÄÖÜ߀$&§@]/g, match => { + // + // Because of unknown behavior of showdown (GH-Issue:#1004) sometimes ampersands are html-encoded and sometimes they aren't, therefore we have to check for already encoded ampersands + var article_output = article_html.replace(/[äöüÄÖÜ߀$&§@](?!amp;)/g, match => { switch (match) { case 'ä': return 'ä';