Skip to content

Dollar signs ($) incorrectly interpreted as LaTeX math delimiters in preview #73

@Filikzz

Description

@Filikzz

Describe the bug

The preview treats $ characters as LaTeX inline math delimiters. When a line contains two or more $ signs, everything between the first and second $ is rendered as math — italicizing the text and stripping spaces between words.

This makes it impossible to write about prices or dollar amounts without the preview mangling the output.

To Reproduce

Steps to reproduce the behavior:

  1. Open Markpad and create a new file
  2. Paste the following markdown:
**Assessment:** Weekly structure is bearish. Price is in a lower-high sequence from $125K → $108K → $76K (this week's high). The 200W MA at $60-65K is the critical macro support. A weekly close below $65K would be very bearish.

### Daily Chart — Intermediate Trend

**Trend:** Clear downtrend. Lower highs: $125K → $120K → $108K → $96K → $88K → $76K. A double bottom formed near $60,000 in late February/early March, which produced the bounce to $76K.

**Key Levels:**
- 200D MA (blue line): ~$96,000-100,000, sloping downward. Price is far below — this is strong overhead resistance on any bounce.
- Horizontal resistance at $108,000 (cyan) and $88,000 (red).
- Double bottom support: $60,000-63,000.
- Current price consolidating between $68K-$76K.

The price fell from $104K to $60K in just one week.
  1. Open split view or preview mode
  2. See the rendering errors in the preview

Expected behavior

Dollar signs should be treated as literal text. The preview should display them as-is without triggering math mode.

Since Markpad advertises "GitHub styled markdown rendering", the $ character should not trigger math mode — GitHub Flavored Markdown (GFM) does not treat $ as a special character.

If LaTeX math support is intentional, it may need a toggle or a heuristic to avoid treating currency amounts as math expressions.

Screenshots

Here are some examples from the preview showing the broken rendering:

  • $125K → $108K → $76K (this week's high). The 200W MA at $60-65K renders as: 125K →108K →76K(thisweek'shigh).The200WMAat60-65K
  • $108,000 (cyan) and $88,000 (red) renders as: 108,000(cyan)and88,000 (red)
  • $104K to $60K renders as: 104Kto60K
  • $68K-$76K renders as: 68*K-*76K

In each case, everything between two $ signs on the same line is treated as LaTeX math — italicized with spaces removed.

(screenshot attached)

Device

  • OS: Windows
  • App Version: v2.6.1

Additional context

Workaround: escaping dollar signs with a backslash (\$104K to \$60K) prevents the math rendering, but this shouldn't be necessary for plain currency text.

BTC-Analysis-markdown-error.md
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions