Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Plug in showdown/highlight properly when loaded via <script> include

  • Loading branch information...
commit 72e65568c9aa6cd343940f50a9b94c0b0a1d8af2 1 parent 34f80d9
@caseman caseman authored
Showing with 2 additions and 11 deletions.
  1. +2 −11 lib/lit.js
View
13 lib/lit.js
@@ -127,16 +127,7 @@
// Global script-include
} else {
window.lit = lit;
- if (typeof Showdown !== 'undefined') {
- if (typeof Showdown.parse === 'function') {
- // github-flavored-markdown
- lit.renderComment = Showdown.parse;
- } else {
- lit.renderComment = function(src) {
- var converter = new Showdown.converter();
- return converter.makeHtml(src);
- }
- }
- }
+ if (typeof Showdown !== 'undefined') hookRenderComment(Showdown);
+ if (typeof highlight !== 'undefined') hookRenderCode(highlight);
}
}).call(this);
Please sign in to comment.
Something went wrong with that request. Please try again.