diff options
Diffstat (limited to 'lib/render.js')
-rw-r--r-- | lib/render.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/render.js b/lib/render.js index ed60216..ef77f35 100644 --- a/lib/render.js +++ b/lib/render.js @@ -80,6 +80,14 @@ Render.prototype.emoji = function (emoji) { }) : name } +function fixSymbols(str) { + // Dillo doesn't do fallback fonts, so specifically render fancy characters + // with Symbola + return str.replace(/[^\u0000-\u00ff]+/, function ($0) { + return '<span class="symbol">' + $0 + '</span>' + }) +} + Render.prototype.markdown = function (text, mentions) { if (!text) return '' var mentionsObj = this._mentions = {} @@ -92,7 +100,7 @@ Render.prototype.markdown = function (text, mentions) { }) var out = marked(String(text), this.markedOpts) delete this._mentions - return out + return fixSymbols(out) } Render.prototype.imageUrl = function (ref) { |