From b6c0c8c074f799cac78b3600e9fa0c3cb8850823 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 8 Jun 2022 09:22:01 +0200 Subject: [PATCH] reenable twemoji --- components/Twemoji.vue | 44 ++++++++++++++++++------------------------ src/parseMarkdown.js | 4 ++-- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/components/Twemoji.vue b/components/Twemoji.vue index 3ddee893..5238c175 100644 --- a/components/Twemoji.vue +++ b/components/Twemoji.vue @@ -1,40 +1,34 @@ diff --git a/src/parseMarkdown.js b/src/parseMarkdown.js index 0c41689b..6674270d 100644 --- a/src/parseMarkdown.js +++ b/src/parseMarkdown.js @@ -1,4 +1,4 @@ -// import twemoji from 'twemoji'; +import twemoji from 'twemoji'; const census_groups = { 'location_poland': 'Osoby mieszkajÄ…ce w Polsce', @@ -77,7 +77,7 @@ export default async function parseMarkdown(markdown) { .replace(/

{census_groups}<\/p>(.+?)

{\/census_groups}<\/p>/gms, mainPlusDetails(census_groups, false)) .replace(/

{census_comparisons}<\/p>(.+?)

{\/census_comparisons}<\/p>/gms, mainPlusDetails(census_comparisons, true)) .replace(/{json=([^=}]+)=([^=}]+)}/g, fetchJson) - .replace(/

{twemoji}<\/p>(.+?)

{\/twemoji}<\/p>/gms, (_, c) => c) // twemoji.parse(c) + .replace(/

{twemoji}<\/p>(.+?)

{\/twemoji}<\/p>/gms, (_, c) => twemoji.parse(c)) + '' ; content = content.replace(/{table_of_contents}/g, generateToC(content));