lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js in gollum-2.4.0 vs lib/gollum/frontend/public/gollum/livepreview/js/livepreview.js in gollum-2.4.1
- old
+ new
@@ -296,9 +296,11 @@
else {
oldInputText = text;
}
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.
// It's used as the delay time in the event listener.
var currTime = new Date().getTime();