From 30b0fdd8805bca76d5f04bf0312633d0a811fa72 Mon Sep 17 00:00:00 2001 From: Christopher Olah Date: Tue, 10 Jan 2017 18:03:47 -0800 Subject: [PATCH] fix bibliography accent issues --- components/bibliography.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/bibliography.js b/components/bibliography.js index d60e592..8eb9b61 100644 --- a/components/bibliography.js +++ b/components/bibliography.js @@ -11,7 +11,11 @@ export default function(dom, data) { if(parsed) { parsed.forEach(e => { for (var k in e.entryTags){ - e.entryTags[k] = e.entryTags[k].replace(/[\t\n ]+/g, " "); + var val = e.entryTags[k]; + val = val.replace(/[\t\n ]+/g, " "); + val = val.replace(/{\\["^`\.'acu~Hvs]( )?([a-zA-Z])}/g, + (full, x, char) => char); + e.entryTags[k] = val; } bibliography[e.citationKey] = e.entryTags; bibliography[e.citationKey].type = e.entryType;