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

Pipes | not rendering correctly in cells with Marked renderer #138

Closed
noraj opened this issue Feb 20, 2017 · 8 comments
Closed

Pipes | not rendering correctly in cells with Marked renderer #138

noraj opened this issue Feb 20, 2017 · 8 comments

Comments

@noraj
Copy link

noraj commented Feb 20, 2017

Environment Info

Node version(node -v)

v7.4.0

Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /home/noraj/Dev/hexo_rawsec
├── hexo@3.2.2
├── hexo-deployer-git@0.2.0
├── hexo-generator-archive@0.1.4
├── hexo-generator-category@0.1.3
├── hexo-generator-feed@1.2.0
├── hexo-generator-index@0.2.0
├── hexo-generator-json-content@2.2.0
├── hexo-generator-tag@0.2.0
├── hexo-i18n@0.2.1
├── hexo-pagination@0.1.0
├── hexo-renderer-ejs@0.2.0
├── hexo-renderer-less@0.2.0
├── hexo-renderer-marked@0.2.11
├── hexo-renderer-sass@0.2.0
├── hexo-renderer-scss@1.0.2
├── hexo-renderer-stylus@0.3.1
├── hexo-server@0.2.0
└── hexo-tag-bootstrap@0.0.8

BUG

Description : pipes inside inline code block inside an array don't display correctly.

Markdown code:

`||`

a     | b
---   | ---
`||`  | `pipe pipe`

Bugous behaviour:

Espected behaviour:

I may also open this bug into marked and hexo-renderer-marked repositories. I also tried with a fresh hexo install and the behaviour is the same.

@noraj
Copy link
Author

noraj commented Feb 20, 2017

Adding the following to my _config.yml doesn't change anything:

marked:
  smartypants: false

In both case the render is

<p><code>||</code></p>
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>`</td>
<td></td>
<td>`</td>
<td><code>pipe pipe</code></td>
</tr>
</tbody>
</table>

@NoahDragon
Copy link
Member

Have you tried the Raw tag?

`||`

a     | b
---   | ---
`<%raw%>||<%endraw%>`  | `pipe pipe`

@dpfranklin
Copy link

This is an issue with Marked itself - not Hexo. See issue here in Marked repo.

Interim fix is to use html which will render as desired in Hexo (but does not render properly in GFM).

`||`

a     | b
---   | --- 
<code>&#124;&#124;</code> | `pipe pipe`

@noraj
Copy link
Author

noraj commented Feb 21, 2017

@dpfranklin : Thanks, I was not sure if it was due to Marked or only hexo-renderer-marked.

@noraj
Copy link
Author

noraj commented Feb 21, 2017

Marked seems no so much updated recently (markedjs/marked#724). And Marked is not CommonMark compliant (markedjs/marked#563).

It's maybe time to switch (as official) to commonmark.js, markdown-it or remarkable. There are already markdown-it, kramdown and pandoc hexo-render alternatives.

@noraj
Copy link
Author

noraj commented Feb 21, 2017

I tried hexo-renderer-markdown-it and the both cases works well now (with default which is GMF support) :

`|`
\|

@noraj noraj changed the title [Marked] Markdown rendering bug Pipes | not rendering correctly in cells with Marked renderer Feb 21, 2017
@noraj
Copy link
Author

noraj commented Feb 21, 2017

Maybe Hexo team should think about considering to use markdown-it renderer as default and official renderer, because Marked seems to begin to die (markedjs/marked#724).

@stevenjoezhang stevenjoezhang transferred this issue from hexojs/hexo Mar 9, 2020
@stevenjoezhang
Copy link
Member

markedjs/marked#595 closed.

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

4 participants