Skip to content

Commit 7d2d001

Browse files
committed
Support git commit messages
1 parent 8124b76 commit 7d2d001

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

spec/git.COMMIT_EDITMSG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
This is the summary line. It can't be too long.
22

3-
After I can write a much more detailed description without quite the same restrictions on length.
3+
After I can write a much more detailed description without quite the
4+
same restrictions on length.
5+
6+
But if the line gets toooooooooooooooooooo long, you should add a line break.
47

58
# Please enter the commit message for your changes. Lines starting
69
# with '#' will be ignored, and an empty message aborts the commit.

styles/languages/_index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@import 'coffee';
77
@import 'css';
88
@import 'gfm';
9+
@import 'git-commit';
910
@import 'html';
1011
@import 'javascript';
1112
@import 'json';

styles/languages/git-commit.less

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Git Commit Message
2+
3+
.git-commit {
4+
5+
6+
7+
// Special cases ----------------------
8+
9+
// Weak 2nd line
10+
[data-screen-row="1"] & {
11+
.uno-3();
12+
}
13+
14+
// Strong subject
15+
[data-screen-row="0"] & {
16+
.uno-1();
17+
font-weight: 500;
18+
}
19+
20+
&.deleted {
21+
color: @syntax-color-removed;
22+
}
23+
24+
&.changed {
25+
color: @syntax-color-modified;
26+
}
27+
28+
&.inserted {
29+
color: @syntax-color-added;
30+
}
31+
32+
// Too long
33+
&.line-too-long.line-too-long {
34+
background-color: mix( @syntax-color-removed, @syntax-background-color, 33% );
35+
}
36+
37+
}

0 commit comments

Comments
 (0)