GithubHelp home page GithubHelp logo

to_mdast Math parsing error about markdown-rs HOT 7 CLOSED

wooorm avatar wooorm commented on May 16, 2024
to_mdast Math parsing error

from markdown-rs.

Comments (7)

wooorm avatar wooorm commented on May 16, 2024

Intended. Math works like code.

``inline``

```
block
```

$$inline$$

$$
block
$$

from markdown-rs.

8LWXpg avatar 8LWXpg commented on May 16, 2024

There's some website that render $$something$$ as block math, like GitHub or Stack Exchange. I hope there's an option or something to do so.

from markdown-rs.

wooorm avatar wooorm commented on May 16, 2024

The problem is that math is unspecified. If I do something here, it won't ever work like all other projects. The solution is to get this specified!

from markdown-rs.

8LWXpg avatar 8LWXpg commented on May 16, 2024

maybe add this inside ParseOptions with force enabling math_text_single_dollar. That way, double dollar is always threated as block math while single dollar will be treated as inline. I think most markdown math is rendered that way (at least for those I familiar with).

from markdown-rs.

wooorm avatar wooorm commented on May 16, 2024

maybe add this inside

add what? what is this?
You asked about matching how GH works and matching how Stack Exchange work.
Thatโ€™s two complex things that are unspecified and take a lot of time, with little benefit.
To reiterate, I think: โ€œThe solution is to get [math in markdown] specified!โ€

from markdown-rs.

8LWXpg avatar 8LWXpg commented on May 16, 2024

I think math in markdown is double dollar for block math and single dollar for inline in most cases, regardless of newline

from markdown-rs.

wooorm avatar wooorm commented on May 16, 2024

There is no specification for that. Every tool is different.

This is based on CM and is exactly the same as the sister projects in JS.

from markdown-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.