FIX: handle german quotes in discourse local-dates (#8386)

https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307
This commit is contained in:
Joffrey JAFFEUX
2019-11-21 11:43:35 +01:00
committed by GitHub
parent 026832fb80
commit 3d1b6b6729
2 changed files with 13 additions and 2 deletions

View File

@ -13,10 +13,12 @@ function addLocalDate(buffer, matches, state) {
countdown: null
};
const matchString = matches[1].replace(/„|“/g, '"');
let parsed = parseBBCodeTag(
"[date date" + matches[1] + "]",
"[date date" + matchString + "]",
0,
matches[1].length + 11
matchString.length + 11
);
config.date = parsed.attrs.date;