Commit c5d3c07d3c33a7990dbd3bd1578064e581e00bec

Golmote 2015-01-04T17:01:27

Merge pull request #452 from vkbansal/handlebars-fix make comment non-greedy in handlebars

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/components/prism-handlebars.js b/components/prism-handlebars.js
index 0971794..031896b 100644
--- a/components/prism-handlebars.js
+++ b/components/prism-handlebars.js
@@ -35,7 +35,7 @@
 	// surround markup
 	Prism.languages.insertBefore('handlebars', 'tag', {
 		'handlebars-comment': {
-			pattern: /\{\{![\w\W]*\}\}/g,
+			pattern: /\{\{![\w\W]*?\}\}/g,
 			alias: ['handlebars','comment']
 		}
 	});
@@ -79,4 +79,4 @@
 		env.element.innerHTML = env.highlightedCode;
 	});
 
-}(Prism));
\ No newline at end of file
+}(Prism));