Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline math in tables renders incorrectly #17

Open
burgerdev opened this issue Apr 22, 2023 · 0 comments
Open

Inline math in tables renders incorrectly #17

burgerdev opened this issue Apr 22, 2023 · 0 comments

Comments

@burgerdev
Copy link

burgerdev commented Apr 22, 2023

Hi @elliotxx,

I'm seeing some unexpected behaviour with Github's inline math inside tables. A minimal example would be

mdfmt << 'EOF'
# Test

The table below should not be mangled.

|         Left | Right |
| -----------: | :---- |
|        short | `foo` |
|        $K_b$ | `bar` |
| longest term | `0`   |
EOF

Output:

# Test

The table below should not be mangled.

|         Left | Right |
| -----------: | :---- |
|        short | `foo` |
|          $K_b$ | `bar` |
| longest term | `0`   |

Note the misalignment in line 4 of the table. Expected output would be the unchanged input (cells still aligned).

This is v0.4.2:

releaseVersion: v0.4.2
gitInfo:
    latestTag: v0.4.2
    commit: 8a49dd084164207a76aac977b9e456a165e71fd4
    treeState: clean
buildInfo:
    goVersion: go1.17.7
    GOOS: linux
    GOARCH: amd64
    numCPU: 2
    compiler: gc
    buildTime: "2022-03-02 07:08:44"

Cheers, Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant