diff --git a/src/article/main.md b/src/article/main.md
index 6a1e625..9220e22 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -12,9 +12,9 @@
### Known properties of traditional waves
-In quantum mechanics, particles are assumed to be governed by a wave function. [Louis-
-de-Broglie](https://de.wikipedia.org/wiki/Louis_de_Broglie) postulated that matter waves should have the same wavelength
-as photons, whose wavelength depends on their respective impulse:
+In quantum mechanics, particles are assumed to be governed by a wave function.
+[Louis-de-Broglie](https://de.wikipedia.org/wiki/Louis_de_Broglie) postulated that matter waves should have the same
+wavelength as photons, whose wavelength depends on their respective impulse:
$$\lambda = \frac{h}{p} = \frac{h}{m*v} $$
diff --git a/src/article/main.md b/src/article/main.md
index 6a1e625..9220e22 100644
--- a/src/article/main.md
+++ b/src/article/main.md
@@ -12,9 +12,9 @@
### Known properties of traditional waves
-In quantum mechanics, particles are assumed to be governed by a wave function. [Louis-
-de-Broglie](https://de.wikipedia.org/wiki/Louis_de_Broglie) postulated that matter waves should have the same wavelength
-as photons, whose wavelength depends on their respective impulse:
+In quantum mechanics, particles are assumed to be governed by a wave function.
+[Louis-de-Broglie](https://de.wikipedia.org/wiki/Louis_de_Broglie) postulated that matter waves should have the same
+wavelength as photons, whose wavelength depends on their respective impulse:
$$\lambda = \frac{h}{p} = \frac{h}{m*v} $$
diff --git a/src/build.js b/src/build.js
index 5eb03d8..7fb52b0 100644
--- a/src/build.js
+++ b/src/build.js
@@ -20,6 +20,8 @@
[fileName.replace(".md", "")]: fs.readFileSync(`${articleFolder}/${fileName}`, 'utf8').split("\n")
}), {});
+console.log("processing article entries...");
+
const applyBigMathMode = line => line.replace(/\$\$/, bigMathMode ? "\\]" : "\\[")
const applyMathMode = line => line.replace(/\$/, mathMode ? "\\)" : "\\(")
@@ -40,6 +42,19 @@
return line
}
+function processLinks(line) {
+ const links = line.match(/\[.*\]\(.*\)/)
+ if (!links) {
+ return line;
+ }
+ links.forEach(link => {
+ const target = link.match(/(?<=\().*(?=\))/)[0]
+ const name = link.match(/(?<=\[).*(?=\])/)[0]
+ line = line.replace(link, `${name}`)
+ });
+ return line;
+}
+
for (const [name, data] of Object.entries(articleEntries)) {
var mathMode = false;
var bigMathMode = false;
@@ -54,12 +69,12 @@
line = `${line.substring(i+1)}`
}
}
+ line = processLinks(line);
line = processMathModes(line);
data[index] = line;
});
}
-console.log("processing article entries...");
for (const [name, data] of Object.entries(articleEntries)) {
articleEntries[name] = data.join(" ");
}