Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: lib/src/prism/components/prism-git.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/prism/components/prism-gherkin.min.js ('k') | lib/src/prism/components/prism-git.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prism/components/prism-git.js
diff --git a/lib/src/prism/components/prism-git.js b/lib/src/prism/components/prism-git.js
index 0d2ecb1c12778c71e46372d644a741afbceb6021..e5cc4cefce272e97109f9c015b5e0bc48df14e21 100644
--- a/lib/src/prism/components/prism-git.js
+++ b/lib/src/prism/components/prism-git.js
@@ -8,7 +8,13 @@ Prism.languages.git = {
* # and have 1 and 2 different commits each, respectively.
* nothing to commit (working directory clean)
*/
- 'comment': /^#.*$/m,
+ 'comment': /^#.*/m,
+
+ /*
+ * Regexp to match the changed lines in a git diff output. Check the example below.
+ */
+ 'deleted': /^[-–].*/m,
+ 'inserted': /^\+.*/m,
/*
* a string (double and simple quote)
@@ -49,12 +55,6 @@ Prism.languages.git = {
'coord': /^@@.*@@$/m,
/*
- * Regexp to match the changed lines in a git diff output. Check the example above.
- */
- 'deleted': /^-(?!-).+$/m,
- 'inserted': /^\+(?!\+).+$/m,
-
- /*
* Match a "commit [SHA1]" line in a git log output.
* For instance:
* $ git log
« no previous file with comments | « lib/src/prism/components/prism-gherkin.min.js ('k') | lib/src/prism/components/prism-git.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698