Skip to content

Commit 8616294

Browse files
committed
Define "builtin-name" for lisps
The regular 'biult_in' doesn't quite work for lisps as it is intended to be used in the context of plain unhighlighted code, while in lisps it's inside of the 'name' and is a part of an s-expression. This may result in jarring style combinations (like bold green in the default style that never happens throughout other languages).
1 parent 5e042b1 commit 8616294

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+58
-8
lines changed

docs/css-classes-reference.rst

Lines changed: 3 additions & 0 deletions

src/languages/clojure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Category: lisp
77

88
function(hljs) {
99
var keywords = {
10-
built_in:
10+
'builtin-name':
1111
// Clojure keywords
1212
'def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+
1313
'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+

src/languages/scheme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function(hljs) {
1212
var SCHEME_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+([./]\\d+)?';
1313
var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';
1414
var BUILTINS = {
15-
built_in:
15+
'builtin-name':
1616
'case-lambda call/cc class define-class exit-handler field import ' +
1717
'inherit init-field interface let*-values let-values let/ec mixin ' +
1818
'opt-lambda override protect provide public rename require ' +

src/styles/agate.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
.hljs-section,
5656
.hljs-attribute,
5757
.hljs-quote,
58-
.hljs-built_in {
58+
.hljs-built_in,
59+
.hljs-builtin-name {
5960
color: #ffa;
6061
}
6162

src/styles/arta.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Author: pumbur <pumbur@pumbur.net>
3838
}
3939

4040
.hljs-built_in,
41+
.hljs-builtin-name,
4142
.hljs-literal,
4243
.hljs-type,
4344
.hljs-template-variable,

src/styles/atelier-cave-dark.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
.hljs-number,
2626
.hljs-meta,
2727
.hljs-built_in,
28+
.hljs-builtin-name,
2829
.hljs-literal,
2930
.hljs-type,
3031
.hljs-params {

src/styles/atelier-cave-light.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.hljs-number,
2828
.hljs-meta,
2929
.hljs-built_in,
30+
.hljs-builtin-name,
3031
.hljs-literal,
3132
.hljs-type,
3233
.hljs-params {

src/styles/atelier-dune-dark.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
.hljs-number,
2727
.hljs-meta,
2828
.hljs-built_in,
29+
.hljs-builtin-name,
2930
.hljs-literal,
3031
.hljs-type,
3132
.hljs-params {

src/styles/atelier-dune-light.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
.hljs-number,
2727
.hljs-meta,
2828
.hljs-built_in,
29+
.hljs-builtin-name,
2930
.hljs-literal,
3031
.hljs-type,
3132
.hljs-params {

src/styles/atelier-estuary-dark.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
.hljs-number,
2727
.hljs-meta,
2828
.hljs-built_in,
29+
.hljs-builtin-name,
2930
.hljs-literal,
3031
.hljs-type,
3132
.hljs-params {

0 commit comments

Comments
 (0)