diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c17150d..74b302250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 2.0.3 ### Bug fixes +- fix: rendering emojis - fix: css var polyfill ## 2.0.2 diff --git a/src/render.js b/src/render.js index 36b8cf672..a01fc9604 100644 --- a/src/render.js +++ b/src/render.js @@ -39,7 +39,7 @@ export function init () { renderer.code = function (code, lang = '') { const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup) - return `
${hl.replace(/:/g, '__colon__')}
` + return `
${hl}
` } renderer.link = function (href, title, text) { if (!/:/.test(href)) { diff --git a/src/util.js b/src/util.js index c57bb42f8..d5b62aeae 100644 --- a/src/util.js +++ b/src/util.js @@ -160,6 +160,7 @@ export const merge = Object.assign || function (to) { export function emojify (text) { return text + .replace(/<(pre|template)[^>]*?>([\s\S]+)<\/(pre|template)>/g, match => match.replace(/:/g, '__colon__')) .replace(/:(\w*?):/ig, '$1') .replace(/__colon__/g, ':') }