# Syntax highlighting for other programming languages within code blocks

#### BobTodd

18 Jan, 2018 07:24 PM

Howdy y'all,

I'm new to MultiMarkdown converter, so I suspect I'm just missing something in the settings (though I've looked... honest!). But is there a way to get syntax highlighting within code blocks?

For example, I was hoping that

HTML
<span lang='non' class='Unicode'>...</span>


would produce a code block where <span lang='non' class='Unicode'>...</span> is rendered with syntax-highlighting for HTML. Is there a way to do that?

Peace out,
Todd

1. Support Staff Posted by Fletcher on 18 Jan, 2018 07:34 PM

Todd,

Thanks for writing in!

Syntax highlighting requires something to provide the highlighting --
most people use javascript to do this, using whatever their preferred
syntax highlighter is.

Further information is in the MMD 5 User's Guide, including an example
setup:

http://fletcher.github.io/MultiMarkdown-5/fences.html

Hope this helps!

Fletcher

2. Posted by BobTodd on 18 Jan, 2018 07:58 PM

Howdy Fletcher,

Super. Thanks for the response. And thanks for pointing me to the MMD 5 User's Guide. That helps.

Your comment also helped me understand the setting "Automatically link to highlight.js...". Clicking this seems to have given some basic syntax highlighting to the HTML export (very sparse, but presumably there's a setting I can muck around with).

Is there a preference that I can edit which will allow the highlighting to be piped through to the MMD preview, even before export?

Thanks so much for your help.

Peace out,
t

3. Support Staff Posted by Fletcher on 18 Jan, 2018 08:01 PM

Everything is already in the preview -- but remember that certain
javascript routines only run at certain points in a browser page's
"lifecycle". Many of these routines (e.g. MathJax) run when the page
loads, but *not* when it is modified. In order to force the entire page
to reload so that all javascript runs, you can:

* Manually refresh the preview from menu bar
* Change preview preferences to always do full reload

You'll have to decide which approach works best for your particular needs

F-

4. Posted by BobTodd on 18 Jan, 2018 08:09 PM

Howdy Fletcher,

Super! Got it! Thanks for walking me through it. That's got me up and running.

Thanks again!

Peace out,
t

5. BobTodd closed this discussion on 26 Jan, 2018 05:56 PM.

Comments are currently closed for this discussion. You can start a new one.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 09 Feb, 2018 07:49 PM Superscript issue in MMD 4.3.1 in macOS 10.13.3 07 Feb, 2018 12:08 PM Issues with CriticMarkup in Chinese 04 Feb, 2018 10:02 PM Theme support for comments 03 Feb, 2018 02:33 PM Apostrophes and colouring 27 Jan, 2018 12:40 AM Metadata for "abstract" in MMD6

## Recent Articles

 MultiMarkdown Composer v4 Themes "I don't think the Pro In-App Purchase is working correctly" Custom Key Bindings and Macros Customize MultiMarkdown Composer MultiMarkdown Composer v4 Expansions