Эх сурвалжийг харах

add global flag back in for whitespace removal, without it most of the content in example.html does not work #682

Hakim El Hattab 10 жил өмнө
parent
commit
44548ba357

+ 1 - 1
plugin/markdown/example.html

@@ -7,7 +7,7 @@
 		<title>reveal.js - Markdown Demo</title>
 
 		<link rel="stylesheet" href="../../css/reveal.css">
-		<link rel="stylesheet" href="../../css/theme/default.css" id="theme">
+		<link rel="stylesheet" href="../../css/theme/white.css" id="theme">
 
         <link rel="stylesheet" href="../../lib/css/zenburn.css">
 	</head>

+ 1 - 1
plugin/markdown/markdown.js

@@ -50,7 +50,7 @@
 			text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
 		}
 		else if( leadingWs > 1 ) {
-			text = text.replace( new RegExp('\\n? {' + leadingWs + '}'), '\n' );
+			text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' );
 		}
 
 		return text;