Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Commit

Permalink
Support git code syntax in live preview
Browse files Browse the repository at this point in the history
Add autocrlf values for Windows, Linux, and OS X.
  • Loading branch information
bootstraponline committed Nov 16, 2012
1 parent 578386f commit c90c3b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
@@ -1,4 +1,11 @@
# https://help.github.com/articles/dealing-with-line-endings # https://help.github.com/articles/dealing-with-line-endings
#
# For Mac & Linux
# git config --global core.autocrlf input
#
# For windows
# git config --global core.autocrlf true
#
# Set default behaviour, in case users don't have core.autocrlf set. # Set default behaviour, in case users don't have core.autocrlf set.
* text=auto * text=auto


Expand Down
Expand Up @@ -298,6 +298,8 @@ var makePreviewHtml = function () {
} }


var prevTime = new Date().getTime(); 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 ); text = md_to_html( text );


// Calculate the processing time of the HTML creation. // Calculate the processing time of the HTML creation.
Expand Down

0 comments on commit c90c3b1

Please sign in to comment.