ng-showdown icon indicating copy to clipboard operation
ng-showdown copied to clipboard

Addin setFlavor function

Open SyntaxRules opened this issue 9 years ago • 1 comments

Add in set flavor function into the $showdownProvider. This would be a new option.

SyntaxRules avatar Sep 22 '15 16:09 SyntaxRules

+1 I wound up doing the following:

var github = { //  the github object was taken from flavor.github in showdown.js
    omitExtraWLInCodeBlocks: true,
    prefixHeaderId: 'user-content-',
    simplifiedAutoLink: true,
    literalMidWordUnderscores: true,
    strikethrough: true,
    tables: true,
    tablesHeaderId: true,
    ghCodeBlocks: true,
    tasklists: true
};
for (var key in github) {
    $showdown.setOption(key, github[key]);
}

Any suggestions on a simpler way?

collaborator99 avatar Dec 10 '15 02:12 collaborator99