ITADN

Automatically render emoji at appropriate sizes

#72Openmarcuswhybrow 创建于 2024-05-02
enhancement
M
marcuswhybrowcommented
In `./assets/2023-11-17-tribute-to-dr-raymond-peat.md` [I used a bunch of emojis](https://github.com/marcuswhybrow/ray-peat-rodeo/blob/fe91f9ee974ccc0b91ba66ef1aab5fe5e43079df/assets/2023-11-17-tribute-to-dr-raymond-peat.md?plain=1#L321-L325). To get the right size relative to the text I used markdown's HTML passthrough to wrap each emoji in a div and individually size them. This appraoch is verbose and repetative, but that's fine for unique problems. However, emoji's are nice to have, and a little work to do this automatically would go a long way. Goldmark could automatically detect emojis in the markdown source, and automatically wrap each emoji in HTML to become the correct size. I found two sizes useful. 1. An mid-paragraph emoji should be around 1.5 times the normal font size. 2. Emoji only paragraphs should be 5 times the normal text size.
1 条评论