ng-showdown
ng-showdown copied to clipboard
Addin setFlavor function
Add in set flavor function into the $showdownProvider. This would be a new option.
+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?