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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
1 Prism.languages.git = { 1 Prism.languages.git = {
2 /* 2 /*
3 * A simple one line comment like in a git status command 3 * A simple one line comment like in a git status command
4 * For instance: 4 * For instance:
5 * $ git status 5 * $ git status
6 * # On branch infinite-scroll 6 * # On branch infinite-scroll
7 * # Your branch and 'origin/sharedBranches/frontendTeam/infinite-scroll ' have diverged, 7 * # Your branch and 'origin/sharedBranches/frontendTeam/infinite-scroll ' have diverged,
8 * # and have 1 and 2 different commits each, respectively. 8 * # and have 1 and 2 different commits each, respectively.
9 * nothing to commit (working directory clean) 9 * nothing to commit (working directory clean)
10 */ 10 */
11 » 'comment': /^#.*$/m, 11 » 'comment': /^#.*/m,
12
13 » /*
14 » * Regexp to match the changed lines in a git diff output. Check the exa mple below.
15 » */
16 » 'deleted': /^[-–].*/m,
17 » 'inserted': /^\+.*/m,
12 18
13 /* 19 /*
14 * a string (double and simple quote) 20 * a string (double and simple quote)
15 */ 21 */
16 'string': /("|')(\\?.)*?\1/m, 22 'string': /("|')(\\?.)*?\1/m,
17 23
18 /* 24 /*
19 * a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters 25 * a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters
20 * For instance: 26 * For instance:
21 * $ git add file.txt 27 * $ git add file.txt
(...skipping 20 matching lines...) Expand all
42 * --- file.txt 48 * --- file.txt
43 * +++ file.txt 49 * +++ file.txt
44 * @@ -1 +1,2 @@ 50 * @@ -1 +1,2 @@
45 * -Here's my tetx file 51 * -Here's my tetx file
46 * +Here's my text file 52 * +Here's my text file
47 * +And this is the second line 53 * +And this is the second line
48 */ 54 */
49 'coord': /^@@.*@@$/m, 55 'coord': /^@@.*@@$/m,
50 56
51 /* 57 /*
52 * Regexp to match the changed lines in a git diff output. Check the exa mple above.
53 */
54 'deleted': /^-(?!-).+$/m,
55 'inserted': /^\+(?!\+).+$/m,
56
57 /*
58 * Match a "commit [SHA1]" line in a git log output. 58 * Match a "commit [SHA1]" line in a git log output.
59 * For instance: 59 * For instance:
60 * $ git log 60 * $ git log
61 * commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09 61 * commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09
62 * Author: lgiraudel 62 * Author: lgiraudel
63 * Date: Mon Feb 17 11:18:34 2014 +0100 63 * Date: Mon Feb 17 11:18:34 2014 +0100
64 * 64 *
65 * Add of a new line 65 * Add of a new line
66 */ 66 */
67 'commit_sha1': /^commit \w{40}$/m 67 'commit_sha1': /^commit \w{40}$/m
68 }; 68 };
OLDNEW
« 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