widgetti / widgetti/solara

Feature request: optionally disable katex in markdown

Open
#698 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.2k
Forks
202
Avg merge
4h 36m
Merged PRs (30d)
3

Description

Consider the following string:

We made $4500 and then $4600 the next month

Solara renders this as:
image

We can manually escape $ ahead of time, but it is a complex procedure. Only pairs of $ render as math, and double-$$ pairs on their own lines. Ideally, we can just disable math output if we know it doesn't apply.

Also, since VSCode doesn't render math text anyway, this escaping produces visible backslashes in that environment:
image

Edit: Escaped dollars show their backslashes in the browser too. So it seems there is no way to properly render the sentence above in markdown?

So it seems the only way to get a uniform behavior is to allow users to disable math mode in browser.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Solara's browser-side Markdown rendering and how KaTeX math is enabled. Reproduce the dollar-amount example, then determine how an option to disable math mode should affect browser output while preserving ordinary Markdown rendering; done means the sentence renders consistently without unintended math formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, python
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.