Skip to content

Option to accept double dollar ($$) for inline maths #63

Closed
@SamyPesse

Description

@SamyPesse

Initial checklist

Problem

Single dollars can easily conflict with financial data in a Markdown content.

For example the following markdown content will be parsed with an inline math node:

The **Team** plan starts at $40 per month and includes your first 5 users. Every user after your first 5 users is charged an additional $8 per month.

Solution

For GitBook, we've solved this problem in our custom markdown parser by also using $$ for inline maths.

A math block:

$$
a = b
$$

An inline one $$a = b$$

It'd be great if remark-math could accept an option to use double dollars for inlines.

Alternatives

An alternative could be to only parse inline maths if there is no spaces in it. But it'd not be a great UX for people writing markdown.

Ex:

This is an inline math: $a=b$

This is not an inline math $a = b$

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions