Created
March 23, 2018 07:32
-
-
Save cachrisman/96db3cd7668ab3805a3560ad67fdb69f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(extension) { | |
| if (typeof showdown !== 'undefined') { | |
| // global (browser or nodejs global) | |
| extension(showdown); | |
| } else if (typeof define === 'function' && define.amd) { | |
| // AMD | |
| define(['showdown'], extension); | |
| } else if (typeof exports === 'object') { | |
| // Node, CommonJS-like | |
| module.exports = extension(require('showdown')); | |
| } else { | |
| // showdown was not found so we throw | |
| throw Error('Could not find showdown library'); | |
| } | |
| }(function(showdown) { | |
| showdown.extension('callout', function() { | |
| return [{ | |
| type: 'lang', | |
| regex: '```callout-important(.*)```', | |
| replace: '<div class="callout callout-important">$1</div>' | |
| }] | |
| }) | |
| })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment