mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-05-23 16:12:21 +02:00
commit
ec8bba319d
2
dist/simplemde.min.css
vendored
2
dist/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
14
dist/simplemde.min.js
vendored
14
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -829,24 +829,24 @@ SimpleMDE.prototype.markdown = function(text) {
|
|||
if(window.marked) {
|
||||
// Initialize
|
||||
var markedOptions = {};
|
||||
|
||||
|
||||
|
||||
|
||||
// Update options
|
||||
if(this.options && this.options.renderingConfig && this.options.renderingConfig.singleLineBreaks !== false) {
|
||||
markedOptions.breaks = true;
|
||||
}
|
||||
|
||||
|
||||
if(this.options && this.options.renderingConfig && this.options.renderingConfig.codeSyntaxHighlighting === true && window.hljs) {
|
||||
markedOptions.highlight = function(code) {
|
||||
return hljs.highlightAuto(code).value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Set options
|
||||
marked.setOptions(markedOptions);
|
||||
|
||||
|
||||
|
||||
|
||||
// Return
|
||||
return marked(text);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue