Cannot render table using kramdown when having Unicode characters in document
I have a very weird problem with rendering table in Marked when using kramdown as custom processor.
Basically, Marked renders a document contains only the table as below:
and Marked renders the same document but contains both the table and some unicode text with characters like (ề, ả..) as follow:
Here is the raw text:
{:.table .table-bordered .table-striped}
|---
| # | Keys Combination | Value | Action | Meaning
|-|-|-|-|-
| 1 | Command + \] | ⌘ \] | Next Pane | Go To Next Panel|
| 2 | Command + \[ | ⌘ \[ | Previous Pane | Go To Previous Panel |
| 3 | Shift + Command + \] | ⇧ ⌘ \] | Next Tab | Go To Next Tab |
| 4 | Shift + Command + \[ | ⇧ ⌘ \[ | Previous Tab | Go To Previous Tab |
| 5 | Command + ← | ⌘ ← | Send ^\[ B [^2] | Back 1 word |
| 6 | Command + → | ⌘ → | Send ^\[ F [^3] | Next 1 word |
| 7 | Shift + Command + → | ⇧ ⌘ → | Send ^[ [F [^4] | End |
| 8 | Shift + Command + ← | ⇧ ⌘ ← | Send ^[ [H [^5] | Home |
| 9 | Shift + Delete | ⇧ Del | Send ^[ D [^6] | Forward Delete |
| 10 | Command + Z | ⌘ Z | Send Hexcode 0x17 [^7]| Delete Last Word |
| 11 | Shift + Command + Z | ⇧ ⌘ Z | Send Hexcode 0x15 [^8]| Clear Command |
I'm using Marked 2 on Lion 10.8.5 at the moment and here is the Marked's Preferences:
Also, I'm pretty sure the problem is not footnotes inside table.
Thanks!
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 01 Oct, 2013 01:08 PM
I tested with your settings (and other combinations), with and without definitions for the footnotes and ALWAYS got:
This is with the Kramdown binary version 1.0.2. If you copy the table to your clipboard and run
pbpaste|kramdown
, does it work fine for you? Note that your RVM instance isn't loading, it's running whatever is installed for the system Ruby. That means that if you haven't installed the gem for systemsudo gem install
, it may not actually be running Kramdown at all.2 Posted by lequochung on 02 Oct, 2013 08:13 AM
Hi Brett
Thank you for the quick reply.
I've tried to copy the raw text into the clipboard and run it with kramdown in the command line and looks like it works fine. Here is the result:
If this means kramdown is running properly, then what would be the problem?
Also, FYI
So looks like I'm using a different version of Kramdown, will that be something to look at as well?
Could you please explain the above part a bit more in detailed, I'm fairly new to ruby and having a hard time with using rvm, I have a bunch of different ruby versions installed all over my system and it's hard to tell which one is being used by what program...
Thanks! I appreciate your help!
Support Staff 3 Posted by Brett on 02 Oct, 2013 04:31 PM
Run:
rvm use system
sudo gem install kramdown
Then make sure you have a binary at /usr/local/bin/kramdown and set your custom processor to that.
Let me know if it helps.
-Brett
4 Posted by lequochung on 02 Oct, 2013 04:53 PM
Hi Brett
After running
I don't see any kramdown binary in /usr/local/bin/
When I run
I still get /usr/local/rvm/gems/ruby-1.9.3-p448/bin/kramdown instead. Should I make /usr/local/bin/kramdown a symlink to this binary?
Thanks!
5 Posted by lequochung on 02 Oct, 2013 05:00 PM
Hi Brett
Just double checked and looks like kramdown was already installed before that, but in
However, it wasn't executable though, so I had to run
then use /usr/bin/kramdown as the binary path for the custom processor and now everything is working as expected.
This also solved my original problem, too! :)
Thanks for looking in to this!
Cheers!
Support Staff 6 Posted by Brett on 02 Oct, 2013 05:36 PM
No problem! Glad to hear it's working.
lequochung closed this discussion on 02 Oct, 2013 05:37 PM.