element-hq / element-hq/element-web

failing to render LaTeX including Unicode 𝟙

Open
#17,812 0 comments 0 reactions 0 assignees View on GitHub
A-Maths T-Defect Z-Labs
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Description

Passing a Unicode «𝟙» to KaTeX makes rendering of the whole message fail.
This is most likely KaTeX's fault, since it only claims support for Unicode-Input of double-struck letters, not numbers. (And LaTeX itself does not support $\mathbb{1}$.)

Maybe Element could instead of failing the whole message just mark that specific math-segment as an error (just like incorrect LaTeX $\someunknowncommand{1}$ is currently handled):
![image](https://user-images.githubusercontent.com/19800705/123634126-56af2400-d81a-11eb-8a19-702091e29b85.png)

### Steps to reproduce

- enable «Render LaTeX maths in messages» in Labs
- send «$𝟙$» as a text message to a room

Element Web with «Render LaTeX maths in messages» displays «Can't load this message (m.room.message) Submit logs» inplace of the message just send.

![image](https://user-images.githubusercontent.com/19800705/123633440-80b41680-d819-11eb-8621-2fcfb48d27e3.png)

Disabling «Render LaTeX maths in messages» displays the Unicode.

![image](https://user-images.githubusercontent.com/19800705/123633551-a4775c80-d819-11eb-9754-b090691fdd3f.png)

Logs being sent: yes (using the link in the failure message, not through the «Help & About» tab)

### Version information

- **Platform**: Flatpak on GNU Guix
- **Version**: 1.7.31

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.