simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.08k stars 135 forks source link

Emojis in headings #164

Closed Hashemian01 closed 2 years ago

Hashemian01 commented 2 years ago

Somehow markdown viewer stopped compiling emojis in headings and some other parts (bold texts for example). Normal texts are still fine. Also I have no problem when using shortcode emojis.

image

simov commented 2 years ago

Is this a remote page? Maybe they have enabled string Content Security Policy. If that's the case you can try to disable it for that origin through the Advanced Options menu.

Hashemian01 commented 2 years ago

No, it's a local file. So I figured that in Radar, Foghorn, Markdown and Markdown5 themes, the heading problem doesn't exist but the problem with the bold texts persists. Might have something to do with the fonts.

simov commented 2 years ago

Not sure how emojis are related to that, can you add a markdown snippet here that I can use to reproduce this one my end?

Hashemian01 commented 2 years ago

Here is the snippet

# ⭐🙏🔰 :star: :pray: :beginner: H1 test

## ⭐🙏🔰 :star: :pray: :beginner: H2 test

### ⭐🙏🔰 :star: :pray: :beginner: H3 test
Text test ⭐🙏🔰 :star: :pray: :beginner:
**Bold text test ⭐🙏🔰 :star: :pray: :beginner:**

Output for the Github theme image

Output for the Radar theme image

Results are from chrome 96.0.4664.110

simov commented 2 years ago

Hi, on my end changing the theme does not affect the rendering of the icons. I get colored icons in all cases. So I'm thinking that the way the Unicode character (emoji) is being rendered is dependent on your Operating System. In case there is an update in your OS that breaks it, this may explain why it stopped working for you. emoji

Hashemian01 commented 2 years ago

Apparently, this is known bug in chrome 96 as reported Here and Here and has nothing to do with the extension. Therefore, I closed the issue.