# How to customise mkdown render behavior?

**URL:** <https://discourse.gohugo.io/t/how-to-customise-mkdown-render-behavior/2501>\
**Category:** support\
**Created:** [January 19, 2016, 10:11am UTC](https://discourse.gohugo.io/t/how-to-customise-mkdown-render-behavior/2501 "2016-01-19T10:11:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![invkrh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/invkrh/32/1140_2.png) [@invkrh](https://discourse.gohugo.io/u/invkrh)\
**Post date:** [January 19, 2016, 10:11am UTC](https://discourse.gohugo.io/t/how-to-customise-mkdown-render-behavior/2501/1 "2016-01-19T10:11:20Z")

</div>

I am using highlight.js 9.1.0 for syntax highlighting. The problem is that it only renders the following block:

```auto
<pre><code class="language-xxx">

```

not

```auto
<pre><code class="xxx">

```

where `xxx` stands for the name of the language.

As far as I know, hugo uses BlackFriday as markdown render. The later will translate fenced block

````auto
```scala
lazy val a = 1

````

into

```

lazy val a = 1

```

, but not

```

lazy val a = 1

```

```auto
As a result, highlight.js can not find the block with the require class name. The highlight does not work at all.

So how to make md render or hugo to generate the expected html as shown above without changing hugo code and recompiling it ?

For the moment, I workaround with a js file to modify the class name. But I prefer a native way to achieve that.

Any ideas?

Thank you.
```

---

<div class="post-metadata">

**Author:** ![moorereason](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/moorereason/32/592_2.png) [@moorereason](https://discourse.gohugo.io/u/moorereason)\
**Post date:** [January 19, 2016, 3:11pm UTC](https://discourse.gohugo.io/t/how-to-customise-mkdown-render-behavior/2501/2 "2016-01-19T15:11:22Z")

</div>

From [highlight.js](https://highlightjs.org/usage/):

> Classes can also be prefixed with either language- or lang-.

I suspect you have some other problem with hightlight.js initialization.
