Skip to content

Commit 3da9888

Browse files
committed
Merge pull request #31 from abdulsattar/master
Added support for marked interpreter
2 parents 42d8061 + 0087de2 commit 3da9888

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

js/bootstrap-markdown.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,14 @@
313313
content = callbackContent
314314
} else {
315315
// Set the content
316-
content = (typeof markdown == 'object') ? markdown.toHTML(container.val()) : container.val()
316+
var val = container.val();
317+
if(typeof markdown == 'object') {
318+
content = markdown.toHTML(val);
319+
}else if(typeof marked == 'function') {
320+
content = marked(val);
321+
} else {
322+
content = val;
323+
}
317324
}
318325

319326
// Build preview element

0 commit comments

Comments
 (0)