RocketChat / RocketChat/Rocket.Chat
New KaTeX bug, line breaks appear as `<br>`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
This definitely wasn't happening last week, not sure when my RocketChat would've upgraded however. I'm on v2.15.2.
Steps to reproduce:
- Do some KaTeX (sorry if the vulgarness seems unprofessional).

- That worked fine and looks great.
- Add some line breaks.

- It's broke. Line breaks show as HTML line breaks.
Expected behavior:
Just do the KaTeX. Ignore newline characters like it did before, UNLESS you use the KaTeX commands for newline.
Actual behavior:
<br> is printed for every newline character.
Client Setup Information
- Desktop App or Browser Version: v2.15.2
- Operating System: Windows 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Rocket.Chat v2.15.2 using KaTeX with ordinary line breaks and compare it with KaTeX commands for newlines. Trace the message rendering path to find where newline characters become literal HTML breaks; done means ordinary newlines are ignored while intentional KaTeX line breaks still render correctly.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100