Permalink
Browse files

Add support for text-only basic snippets

  • Loading branch information...
1 parent 6ff0923 commit b677bbce34f8f2705893b6b2915ca153172696bc @Osmose Osmose committed Jul 18, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 site_media/snippetBodyWidget.js
View
5 site_media/snippetBodyWidget.js
@@ -78,8 +78,9 @@ jQuery(function($) {
// Be dumb and throw a regex at it
var img_matches = snippet_code.match(/<img class="icon" src="([\s\S]+)" \/>/);
- if (img_matches === null) return;
- preview_icon_data = img_matches[1];
+ if (img_matches !== null) {
+ preview_icon_data = img_matches[1];
+ }
var text_matches = snippet_code.match(/<p>(.+)<\/p>/);
if (text_matches === null) return;

0 comments on commit b677bbc

Please sign in to comment.