jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.82k stars 643 forks source link

Syntax highlighting for code blocks does not work #117

Open pmatulis opened 4 years ago

pmatulis commented 4 years ago

This does not result in any highlighting:

```yaml
     neutron-api:                                                                
       charm: cs:xenial/neutron-api                                              
       num_units: 1                                                              
       bindings:                                                                 
         public: public-space
```

The last line is just backticks. I just don't know how to render them in this comment box.

waldyrious commented 4 years ago

The last line is just backticks. I just don't know how to render them in this comment box.

You can indent the entire fenced block (including the backtick lines) with 4 spaces. That way you won't need any escaping for the backticks.

Example:

```
foobar
```
aero31aero commented 4 years ago

Hey, this is a simple bug due to us using a really old version of highlight.js. These are the only supported languages:

coffeescript
apache
http
cs
java
sql
nginx
xml
diff
javascript
bash
objectivec
markdown
json
python
ruby
cpp
css
php
perl
ini
makefile

We should start using newer hljs.