Skip to content

Commit 45b46e3

Browse files
committed
Add basic support for C and C++ syntax highlighting
1 parent 65621fb commit 45b46e3

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

site/lib/src/highlight/theme/dark.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ final Map<Tag, TextStyle> dashDarkTheme = {
6565
blue: 0x7E,
6666
),
6767
),
68+
const Tag('name', parent: Tags.preprocessorDirective): const TextStyle(
69+
foregroundColor: Color.fromArgb(
70+
red: 0xFF,
71+
green: 0x89,
72+
blue: 0x7E,
73+
),
74+
),
6875

6976
Tags.operator: const TextStyle(
7077
foregroundColor: Color.fromArgb(

site/lib/src/highlight/theme/light.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ final Map<Tag, TextStyle> dashLightTheme = {
6565
blue: 0x14,
6666
),
6767
),
68+
const Tag('name', parent: Tags.preprocessorDirective): const TextStyle(
69+
foregroundColor: Color.fromArgb(
70+
red: 0xBD,
71+
green: 0x23,
72+
blue: 0x14,
73+
),
74+
),
6875

6976
Tags.operator: const TextStyle(
7077
foregroundColor: Color.fromArgb(

site/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
markdown_description_list: ^0.1.1
2121
meta: ^1.17.0
2222
# Used for syntax highlighting.
23-
opal: ^0.1.0
23+
opal: ^0.2.0
2424
path: ^1.9.1
2525
pub_semver: ^2.2.0
2626
universal_web: ^1.1.1+1

0 commit comments

Comments
 (0)