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

[BUG] Markdown doesn't support single dash table define #2098

Closed
zyxkad opened this issue Mar 10, 2023 · 2 comments
Closed

[BUG] Markdown doesn't support single dash table define #2098

zyxkad opened this issue Mar 10, 2023 · 2 comments

Comments

@zyxkad
Copy link

zyxkad commented Mar 10, 2023

Describe the bug
When I render user inputs that used single dash table, it didn't render correctly.

To Reproduce
Steps to reproduce the behavior:

data := `
| a | b | c |
| - | - | - |
| 1 | 2 | 3 |
`
app := iris.Default()
app.Get("/", func(ctx iris.Context){
    ctx.Markdown(([]byte)(data))
})
// serve app

Access the entrypoint, it will return

<p>| a | b | c |
| - | - | - |
| 1 | 2 | 3 |</p>

Expected behavior

when I access the point, it should returned a table

Screenshots

Desktop (please complete the following information):

  • OS: N/A

iris.Version

  • v12@master

Please make sure the bug is reproducible over the master branch:

$ cd PROJECT
$ go get -u github.com/kataras/iris/v12@master
$ go run .

Additional context
I opened an issue at russross/blackfriday#707, but I think this project was died, can you use another markdown library that support markdown table?

Don't ask me use three dashes input, the input is users, not mine

@kataras
Copy link
Owner

kataras commented Mar 20, 2023

Hello @zyxkad, I've just pushed a commit on master branch (go get github.com/kataras/iris/v12@master && go mod tidy --compat=1.20) which replaced the markdown library. I've tested your example, it parsed correctly.

@zyxkad
Copy link
Author

zyxkad commented Mar 20, 2023

Thank you :)

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

No branches or pull requests

2 participants