Support git code syntax in live preview

Add autocrlf values for Windows, Linux, and OS X.
This commit is contained in:
bootstraponline
2012-11-16 16:57:39 -07:00
parent 578386f083
commit c90c3b1544
2 changed files with 9 additions and 0 deletions
@@ -298,6 +298,8 @@ var makePreviewHtml = function () {
}
var prevTime = new Date().getTime();
// Handle gollum file code insertion syntax.
text = text.replace(/^[ \t]*``` ?([^:\n\r]+:[^`\n\r]+)```/gm, '``$1``');
text = md_to_html( text );
// Calculate the processing time of the HTML creation.