markdown-editor icon indicating copy to clipboard operation
markdown-editor copied to clipboard

Syntax highlighting for code blocks does not work

Open pmatulis opened this issue 4 years ago • 2 comments

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.

pmatulis avatar Jan 09 '20 18:01 pmatulis

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
```

waldyrious avatar Jan 09 '20 22:01 waldyrious

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.

aero31aero avatar Jan 24 '20 04:01 aero31aero