micromark / micromark-extension-math

micromark extension to support math (`$C_L$`)
https://unifiedjs.com
MIT License
12 stars 6 forks source link

Produces wrong output compared to github math #5

Closed snimavat closed 1 year ago

snimavat commented 1 year ago

Initial checklist

Affected packages and versions

"micromark-extension-math": "^2.1.2",

Link to runnable example

No response

Steps to reproduce

This is what I have

const mdToHtml = (md) => {
   const result = micromark(md, {
      extensions: [gfm(), math()],
      htmlExtensions: [gfmHtml(), mathHtml()]
   })
   return result
}

For the input

$\left[\mathrm{ML}^2 \mathrm{~T}^{-2} \mathrm{~K}\right]$

It generates out put which contains extra [ML2 T−2 K−1] right after the equation

See screenshot for generated output

Screenshot 2023-06-07 at 10 46 57 PM

Expected behavior

Expect it to generate only math formula without extra output

Actual behavior

Generates exra output

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

wooorm commented 1 year ago

Read the readme. Use CSS. https://github.com/micromark/micromark-extension-math#css

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

snimavat commented 1 year ago

Sorry for missing that - i will check and update. Thanks