Skip to content

Commit

Permalink
fix undefined language
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Nov 27, 2016
1 parent 94f0005 commit fc2e5b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ docsify serve docs
<link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css">
```

### 压缩版
压缩版

```html
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
Expand Down
2 changes: 1 addition & 1 deletion src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ renderer.heading = function (text, level) {
}

// highlight code
renderer.code = function (code, lang) {
renderer.code = function (code, lang = '') {
const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)

return `<pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
Expand Down

0 comments on commit fc2e5b6

Please sign in to comment.