RocketChat / RocketChat/Rocket.Chat
Missing test cases for KaTeX dollar syntax and option gating in message-parser
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
The current katex.test.ts only has 2 test cases and only covers parenthesis syntax (\[...\] and \(...\)).
Missing test cases include:
- Dollar syntax (
$$...$$) block KaTeX - Dollar syntax (
$...$) inline KaTeX - Option gating — KaTeX delimiters treated as plain text when options are disabled
This weakens confidence in KaTeX parsing behavior, especially relevant ahead of the planned parser rewrite where test coverage is critical.
Steps to reproduce:
- Open
packages/message-parser/tests/katex.test.ts - Observe only 2 test cases exist
- Dollar syntax and option gating have no test case
Expected behavior:
KaTeX parsing should have test coverage for all supported syntax variants and option flags.
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
Start with packages/message-parser/tests/katex.test.ts, where the existing two parenthesis-syntax cases are defined. Add coverage for $$...$$ block syntax, $...$ inline syntax, and disabled-option behavior where delimiters remain plain text. Done means the supported syntax variants and option gating are each covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100