roojs-all.js
[roojs1] / Roo / Markdown.js
index abf748e..6ffe6e0 100644 (file)
@@ -32,7 +32,9 @@ Roo.Markdown.toHtml = function(text) {
             smartLists: true,
             smartypants: false
           });
-
+    // A FEW HACKS!!?
+    
+    text = text.replace(/\\\n/g,' ');
     return Roo.Markdown.marked(text);
 };
 //
@@ -863,7 +865,7 @@ Roo.Markdown.toHtml = function(text) {
     };
     
     Renderer.prototype.table = function(header, body) {
-      return '<table>\n'
+      return '<table class="table table-striped">\n'
         + '<thead>\n'
         + header
         + '</thead>\n'
@@ -1151,7 +1153,7 @@ Roo.Markdown.toHtml = function(text) {
       regex = regex.source;
       opt = opt || '';
       return function self(name, val) {
-        if (!name) return new RegExp(regex, opt);
+        if (!name) { return new RegExp(regex, opt); }
         val = val.source || val;
         val = val.replace(/(^|[^\[])\^/g, '$1');
         regex = regex.replace(name, val);
@@ -1233,7 +1235,7 @@ Roo.Markdown.toHtml = function(text) {
     
         delete opt.highlight;
     
-        if (!pending) return done();
+        if (!pending) { return done(); }
     
         for (; i < tokens.length; i++) {
           (function(token) {
@@ -1241,7 +1243,7 @@ Roo.Markdown.toHtml = function(text) {
               return --pending || done();
             }
             return highlight(token.text, token.lang, function(err, code) {
-              if (err) return done(err);
+              if (err) { return done(err); }
               if (code == null || code === token.text) {
                 return --pending || done();
               }
@@ -1255,7 +1257,7 @@ Roo.Markdown.toHtml = function(text) {
         return;
       }
       try {
-        if (opt) opt = merge({}, marked.defaults, opt);
+        if (opt) { opt = merge({}, marked.defaults, opt); }
         return Parser.parse(Lexer.lex(src, opt), opt);
       } catch (e) {
         e.message += '\nPlease report this to https://github.com/chjj/marked.';