summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/gitbook-core/src/shapes/File.js3
-rw-r--r--packages/gitbook-plugin-highlight/src/CodeBlock.js2
-rw-r--r--packages/gitbook/src/browser/__tests__/render.js4
3 files changed, 6 insertions, 3 deletions
diff --git a/packages/gitbook-core/src/shapes/File.js b/packages/gitbook-core/src/shapes/File.js
index 6c7df3e..fb7bc06 100644
--- a/packages/gitbook-core/src/shapes/File.js
+++ b/packages/gitbook-core/src/shapes/File.js
@@ -6,9 +6,8 @@ const {
shape
} = React.PropTypes;
-
module.exports = shape({
mtime: instanceOf(Date).isRequired,
path: string.isRequired,
- type: oneOf(['markdown', 'asciidoc']).isRequired
+ type: oneOf(['', 'markdown', 'asciidoc']).isRequired
});
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" />;
diff --git a/packages/gitbook/src/browser/__tests__/render.js b/packages/gitbook/src/browser/__tests__/render.js
new file mode 100644
index 0000000..799be44
--- /dev/null
+++ b/packages/gitbook/src/browser/__tests__/render.js
@@ -0,0 +1,4 @@
+
+describe('render', () => {
+
+});