Skip to content

Commit 2f4c414

Browse files
authored
Improve "diff" highlight support (#2195)
1 parent 4c325bc commit 2f4c414

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.changeset/pink-bulldogs-invent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': minor
3+
---
4+
5+
Improves support for the "diff" language in our custom Highlight theme.

src/vendor/highlight/_theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
color: color.$base-orange-lighter;
3939
}
4040

41+
.hljs-deletion,
4142
.hljs-literal,
4243
.hljs-selector-tag,
4344
.hljs-symbol,
@@ -58,6 +59,7 @@
5859
);
5960
}
6061

62+
.hljs-addition,
6163
.hljs-string {
6264
color: color.$base-green-lighter;
6365
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Index: languages/ini.js
2+
===================================================================
3+
--- languages/ini.js (revision 199)
4+
+++ languages/ini.js (revision 200)
5+
@@ -1,8 +1,7 @@
6+
hljs.LANGUAGES.ini =
7+
{
8+
case_insensitive: true,
9+
- defaultMode:
10+
- {
11+
+ defaultMode: {
12+
contains: ['comment', 'title', 'setting'],
13+
illegal: '[^\\s]'
14+
},
15+
16+
*** /path/to/original timestamp
17+
--- /path/to/new timestamp
18+
***************
19+
*** 1,3 ****

0 commit comments

Comments
 (0)