From 9809685e53046a42029f838b228362b8ce9af22f Mon Sep 17 00:00:00 2001 From: Felix Wu Date: Wed, 1 Aug 2018 20:15:11 +0200 Subject: [PATCH] feat$(abcjs): add extension file --- src/extensions/abcNotationExtension.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/extensions/abcNotationExtension.js diff --git a/src/extensions/abcNotationExtension.js b/src/extensions/abcNotationExtension.js new file mode 100644 index 00000000..58013737 --- /dev/null +++ b/src/extensions/abcNotationExtension.js @@ -0,0 +1,13 @@ +// import abcjs from 'abcjs'; +import markdownItNotesSheet from './libs/markdownItNotesSheet'; +import extensionSvc from '../services/extensionSvc'; + +extensionSvc.onGetOptions((options, properties) => { + options.abc = properties.extensions.abc.enabled; +}); + +extensionSvc.onInitConverter(2, (markdown, options) => { + if (options.abc) { + markdown.use(markdownItNotesSheet); + } +});