Remove brackets in bibtex entries that are used for plaintext rendering

This commit is contained in:
Max Bileschi
2019-06-05 12:08:18 -04:00
parent 042da68b9a
commit 97a01fae73
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
@article{gregor2015draw,
title={DRAW: A recurrent neural network for image generation},
title={{D}{R}{A}{W}: A recurrent neural network for image generation},
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
journal={arXiv preprint arXiv:1502.04623},
year={2015},
+2 -1
View File
@@ -18,7 +18,8 @@ function normalizeTag(string) {
return string
.replace(/[\t\n ]+/g, ' ')
.replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char)
.replace(/{\\([a-zA-Z])}/g, (full, char) => char);
.replace(/{\\([a-zA-Z])}/g, (full, char) => char)
.replace(/[{}]/gi,''); // Replace curly braces forcing plaintext in latex.
}
export function parseBibtex(bibtex) {