Skip to content

Commit a819974

Browse files
authored
Fix C++ Code Block Highlighting in Markdown Rendering (#463)
* Add temporary page at /issue305 to test the styling * Add example C++, Swift, and JavaScript code block to /issue305 * Add syntax highlighting for C++ language * Add syntax highlighting for C++ code having .language-c++ class * Improve syntax highlighting for C++ code * Remove temporary page (/issue305) * Add comment against C++ exclusive classes for better readability
1 parent 9b252d7 commit a819974

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

assets/stylesheets/_syntax.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,17 @@
118118
.language-console {
119119
color: var(--color-syntax-plain-text);
120120
}
121+
122+
123+
// Explicit syntax highlighting for C++ code blocks:
124+
125+
.language-cpp .cp,
126+
.language-cpp .kt,
127+
.language-cpp .nl,
128+
.language-cpp .o,
129+
.language-c\+\+ .cp,
130+
.language-c\+\+ .kt,
131+
.language-c\+\+ .nl,
132+
.language-c\+\+ .o {
133+
color: var(--color-syntax-keywords);
134+
}

0 commit comments

Comments
 (0)