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

Markdown table rendering does not respect escaping of | #144

Closed
bojand opened this issue Apr 4, 2017 · 3 comments
Closed

Markdown table rendering does not respect escaping of | #144

bojand opened this issue Apr 4, 2017 · 3 comments

Comments

@bojand
Copy link
Contributor

bojand commented Apr 4, 2017

Hello, like I mentioned before I generate jsdoc to markdown. A standard way to specify multiple types allowed for a parameter is something like

* @param {String|Array} id the document id / key or an array of keys

which gets converted into markdown table like so:

| Param | Type | Description |
| --- | --- | --- |
| id | <code>String</code> \| <code>Array</code> | the document id / key or an array of keys 

This is valid markdown and renders correctly:

Param Type Description
id String | Array the document id / key or an array of keys

With docsify it gets rendered as pictured:

image

The escaping \| is not respected it seems.

I'll try and dig into this some more.

@QingWei-Li
Copy link
Member

This is marked bug, I think you should report a issue to marked repo.

@bojand
Copy link
Contributor Author

bojand commented Apr 5, 2017

Right wasn't sure if it was the markdown parser / renderer issue or docsify. There is already an [issue for this bug[(https://github.com/markedjs/marked/issues/595). Although marked doesn't seem to be maintained according to issue (724)[https://github.com/markedjs/marked/issues/724]. Others are suggesting using markdown-it.

A workaround is to use &#124; instead of \|.
Feel free to close the issue if you wish so or think it's appropriate.

@QingWei-Li
Copy link
Member

QingWei-Li commented Apr 5, 2017

markdown-it size is very big. I do not think it's a big problem. But you can custom markdown parser by markdown option https://docsify.js.org/#/markdown

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

2 participants