diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-10-04 18:53:58 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-10-04 18:53:58 +0200 |
commit | a863b55c798b4dc0a177fe1ada9cd428f1a5444d (patch) | |
tree | 0a3a41543bfc31527d4f4c19f5473df7afbff0ea /packages/gitbook-plugin-highlight/src/index.js | |
parent | 16ca48b2c05dad0af4cec600cee69adcafcf255f (diff) | |
download | gitbook-a863b55c798b4dc0a177fe1ada9cd428f1a5444d.zip gitbook-a863b55c798b4dc0a177fe1ada9cd428f1a5444d.tar.gz gitbook-a863b55c798b4dc0a177fe1ada9cd428f1a5444d.tar.bz2 |
Start new highlight.js plugin
Diffstat (limited to 'packages/gitbook-plugin-highlight/src/index.js')
-rw-r--r-- | packages/gitbook-plugin-highlight/src/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-highlight/src/index.js b/packages/gitbook-plugin-highlight/src/index.js new file mode 100644 index 0000000..3f17c42 --- /dev/null +++ b/packages/gitbook-plugin-highlight/src/index.js @@ -0,0 +1,9 @@ +const GitBook = require('gitbook-core'); +const CodeBlock = require('./CodeBlock'); + +module.exports = GitBook.createPlugin({ + activate: (dispatch, getState, { Components }) => { + dispatch(Components.registerComponent(CodeBlock, { role: 'html:code' })); + }, + reduce: (state, action) => state +}); |