Highlight of Matlab code

Some User's Avatar

Some User

02 Jan, 2013 01:39 PM

If I understood well, Marked uses highlight.js to highlight code. I'm trying to render some Matlab code but it's not highlighted properly. It looks like highlight.js supports Matlab though (scroll down at http://softwaremaniacs.org/media/soft/highlight/test.html). I'm attaching a test Markdown file with the same code so you can compare the rendering. My options are set as follows:

  • Convert fenced code blocks is ON
  • Automatic syntax highlighting is ON with github.css (I tried other css options; the result is the same)

I also tried turning "Convert fenced code blocks" off and simply indenting my code but the result is the same.

Any ideas?

Thanks!

  1. Support Staff 1 Posted by Brett on 02 Jan, 2013 02:42 PM

    Brett's Avatar

    At the time that 1.4 was released, Matlab support wasn't included in Highlight.js. It's updated for the next release. If you can't wait, let me know and I can help you hack the new version into the bundle until the update.

  2. 2 Posted by Some User on 02 Jan, 2013 03:02 PM

    Some User's Avatar

    That's awesome. Many thanks! I can wait until the next release. Do you already know when that will be?

  3. Support Staff 3 Posted by Brett on 02 Jan, 2013 03:12 PM

    Brett's Avatar

    I don't, yet, but the beta is almost stable and I just have some logistics to figure out.

  4. 4 Posted by Some User on 18 Jun, 2013 08:03 PM

    Some User's Avatar

    I'm wondering if there are updates on this.

  5. Support Staff 5 Posted by Brett on 22 Jun, 2013 06:18 PM

    Brett's Avatar

    Still working out the details for the next major release, but I will update highlight.js for the current App Store version as soon as possible.

  6. 6 Posted by Some User on 27 Sep, 2013 07:44 PM

    Some User's Avatar

    Is the above available in Marked 2?

  7. Support Staff 7 Posted by Brett on 27 Sep, 2013 08:16 PM

    Brett's Avatar

    Hadn't tested it before, but it looks pretty solid: http://ckyp.us/HmWF

    -Brett

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • test-matlab.md 1.32 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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