diff --git a/src/article/main.md b/src/article/main.md index 9adba72..334785e 100644 --- a/src/article/main.md +++ b/src/article/main.md @@ -1,7 +1,7 @@ %English # The schrodinger equation %German -# Die Schrödinger Gleichung +# Die Schr"odinger Gleichung %English ## Preface diff --git a/src/article/main.md b/src/article/main.md index 9adba72..334785e 100644 --- a/src/article/main.md +++ b/src/article/main.md @@ -1,7 +1,7 @@ %English # The schrodinger equation %German -# Die Schrödinger Gleichung +# Die Schr"odinger Gleichung %English ## Preface diff --git a/src/build.js b/src/build.js index e1bf5da..e35187e 100644 --- a/src/build.js +++ b/src/build.js @@ -65,6 +65,19 @@ }), {}) }), {}) +const validUmlaute = "aeouAEOU" + +function processUmlaute(line) { + const matches = line.match(/(?!\\)\"[aeouAEOU]/) + if (!matches) { + return line + } + matches.forEach(umlaut => { + line = line.replace(umlaut, `&${umlaut.substring(1)}uml;`) + }) + return line +} + for (const [name, data] of Object.entries(articleEntries)) { var mathMode = false var bigMathMode = false @@ -84,8 +97,9 @@ line = `${line.substring(i+1)}` } } - line = processLinks(line); - line = processMathModes(line); + line = processUmlaute(line) + line = processLinks(line) + line = processMathModes(line) if (language == "common") { languages.forEach(language => { result[name][language] += `${line} `