diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-10-12 15:47:29 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-10-12 15:47:29 +0200 |
commit | 961b9d7031347c2c108b22c9c4cf85ce3e0c63d0 (patch) | |
tree | 770e0219c17f4875df6a7549cf7afcb356fcfb99 /packages/gitbook-plugin-highlight | |
parent | 5b0622014afe35a7f1eda9a47e2f94710304f8c6 (diff) | |
download | gitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.zip gitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.tar.gz gitbook-961b9d7031347c2c108b22c9c4cf85ce3e0c63d0.tar.bz2 |
Fix error for code blocks without language
Diffstat (limited to 'packages/gitbook-plugin-highlight')
-rw-r--r-- | packages/gitbook-plugin-highlight/src/CodeBlock.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/gitbook-plugin-highlight/src/CodeBlock.js b/packages/gitbook-plugin-highlight/src/CodeBlock.js index 89f6793..a556d36 100644 --- a/packages/gitbook-plugin-highlight/src/CodeBlock.js +++ b/packages/gitbook-plugin-highlight/src/CodeBlock.js @@ -29,7 +29,7 @@ const CodeBlock = React.createClass({ render() { const { children, className } = this.props; const content = getChildrenToText(children); - const lang = getLanguage(className); + const lang = getLanguage(className || ''); const includeCSS = <GitBook.ImportCSS href="gitbook/highlight/white.css" />; |