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

can't convert (\|) as (|) in table #595

Closed
helphi opened this issue May 21, 2015 · 11 comments
Closed

can't convert (\|) as (|) in table #595

helphi opened this issue May 21, 2015 · 11 comments

Comments

@helphi
Copy link

helphi commented May 21, 2015

for example:

col1 | col2
---- | ----
bar | bar
\|  |  \|
@getaaron
Copy link

@helphi | isn't the list of escapable characters, so that may be why it isn't working. (I don't see anything in the GitHub spec about it either.)

Interestingly, I am also having trouble parsing tables with |, even when they're in code ticks, like so:

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| In ticks: `|` | test          |    $4 |

This renders correctly on GitHub:

Tables Are Cool
In ticks: ` ` test

But it renders incorrectly on Gist and when using marked.js.

@bdougie
Copy link

bdougie commented Jul 28, 2015

The error in parsing might have something to do with robotskirt(the parser) failing to build. I got the error when I cloned the repo to get ready to debug locally. There is also failing test for me as well.

If the parser is not working and it looks like its no longer being supported as well deprecation commit. Last commit to main repo is 11/2013.

Currently looking into alternatives

570 verbose pkgid robotskirt@2.7.1
571 verbose cwd /Users/bdoug/Desktop/marked
572 error Darwin 14.4.0
573 error argv "node" "/usr/local/bin/npm" "install"
574 error node v0.12.0
575 error npm  v2.5.1
576 error code ELIFECYCLE
577 error robotskirt@2.7.1 install: `node-gyp rebuild`
577 error Exit status 1
578 error Failed at the robotskirt@2.7.1 install script 'node-gyp rebuild'.
578 error This is most likely a problem with the robotskirt package,
578 error not with npm itself.
578 error Tell the author that this fails on your system:
578 error     node-gyp rebuild
578 error You can get their info via:
578 error     npm owner ls robotskirt
578 error There is likely additional logging output above.
579 verbose exit [ 1, true ]
580 verbose unbuild node_modules/robotskirt
581 info preuninstall robotskirt@2.7.1
582 info uninstall robotskirt@2.7.1
583 verbose unbuild rmStuff robotskirt@2.7.1 from /Users/bdoug/Desktop/marked/node_modules
584 verbose gentlyRm verifying that /Users/bdoug/Desktop/marked is managed by npm
585 silly isManaged /Users/bdoug/Desktop/marked is not inside /Users/bdoug/Desktop/marked/node_modules
586 silly isManaged /Users/bdoug/Desktop/marked is not inside /Users/bdoug/Desktop/marked/node_modules
587 silly isManaged /Users/bdoug/Desktop/marked/node_modules/.bin is inside /Users/bdoug/Desktop/marked
588 silly gentlyRm /Users/bdoug/Desktop/marked is managed by npm
589 silly gentlyRm /Users/bdoug/Desktop/marked/node_modules/.bin/robotskirt is under /Users/bdoug/Desktop/marked
590 verbose gentlyRm vacuuming /Users/bdoug/Desktop/marked/node_modules/.bin/robotskirt up to /Users/bdoug/Desktop/marked
591 silly gentlyRm removing /Users/bdoug/Desktop/marked/node_modules/.bin/robotskirt
592 silly gentlyRm quitting because other entries in /Users/bdoug/Desktop/marked/node_modules/.bin
593 info postuninstall robotskirt@2.7.1
594 verbose gentlyRm vacuuming /Users/bdoug/Desktop/marked/node_modules/robotskirt
595 silly gentlyRm purging /Users/bdoug/Desktop/marked/node_modules/robotskirt
596 silly gentlyRm quitting because other entries in /Users/bdoug/Desktop/marked/node_modules

@bdougie
Copy link

bdougie commented Jul 28, 2015

I found out that roboskirt is no longer being supported. The recommendation is to use hoedown. I am looking into that now.

@bdougie
Copy link

bdougie commented Aug 4, 2015

I have a fix:

Turns out the | is confusing the markdown. If you wrap any pipes in in a <code></code> block and replace the pipe with the literal &#124; you will be good to go.

But the following will work for you

col1 | col2
---- | ----
bar | bar
\|  | <code>/H:&#124;</code>

helphi added a commit to helphi/marked that referenced this issue Aug 9, 2015
@PetarKirov
Copy link

@getaaron Escaping | wtih \| in tables is actually mentioned in the GitHub documentation here (at the bottom of the page).

@noraj
Copy link

noraj commented Feb 21, 2017

From https://github.com/hexojs/hexo/issues/2414

@bdougie is right, that doesn't work with backquote either.

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

Markdown code:

`||`

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

Bugous behaviour:

Espected behaviour:

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>

Have you plan a permanent fix?

@noraj
Copy link

noraj commented Feb 21, 2017

@ZombineDev \| is GFM (GitHub Flavored Markdown) (but is not Gruber's original Markdown) so Marked must support it as Marked claims to support GFM (activated by default).

Problems comes from the parser : roboskirt. roboskirt is not more updated but node-hoedown seems not either.
A better approach is to consider a CommonMark compliant parser (#563).
commonmark.js, markdown-it and remarkable all seems well updated an wide spreaded.

@noraj
Copy link

noraj commented Feb 21, 2017

Both `||` and \| work well with markdown-it. As you can see here. Maybe consider to use markdown-it, because Marked seems to begin to die (#724).

@bojand
Copy link

bojand commented Apr 5, 2017

Also seeing it in this docsify issue

@joshbruce
Copy link
Member

#980

@joshbruce
Copy link
Member

Believe this is fixed as a 0.3.19 or will be fixed by spec-compliance. See #1106 and #1216

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

7 participants