Skip to content

Commit df2bbb4

Browse files
committed
Add support for syntax highlighting on 4.4 page
1 parent fa5edbc commit df2bbb4

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

_sass/common/_release_style.scss

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ $subsection-base-color: grey;
523523
--color-code-gdscript-stringname: #{$color-code-gdscript-stringname--dark};
524524
}
525525

526-
code.highlight {
526+
.highlight {
527527
$_padding: 5px;
528528

529529
background-color: color-mix(
@@ -545,30 +545,31 @@ $subsection-base-color: grey;
545545
border-radius: $_padding;
546546

547547
color: var(--color-code-text);
548-
549-
.symbol {
550-
color: var(--color-code-symbol);
551-
}
552-
.keyword {
553-
color: var(--color-code-keyword);
554-
}
555-
.controlflow {
556-
color: var(--color-code-controlflow);
557-
}
558-
.basetype {
559-
color: var(--color-code-basetype);
560-
}
561-
.function {
562-
color: var(--color-code-function);
563-
}
564-
.membervariable {
565-
color: var(--color-code-membervariable);
566-
}
567-
.gdscript-globalfunction {
568-
color: var(--color-code-gdscript-globalfunction);
569-
}
570-
.gdscript-annotation {
571-
color: var(--color-code-gdscript-annotation);
548+
font-family:
549+
ui-monospace,
550+
SFMono-Regular,
551+
SF Mono,
552+
Menlo,
553+
Consolas,
554+
Liberation Mono,
555+
monospace;
556+
557+
@each $key
558+
in (
559+
symbol
560+
keyword
561+
controlflow
562+
basetype
563+
function
564+
membervariable
565+
gdscript-globalfunction
566+
gdscript-annotation
567+
)
568+
{
569+
.#{$key},
570+
&.#{$key} {
571+
color: var(--color-code-#{$key});
572+
}
572573
}
573574
}
574575

collections/_release_4_4/entry-scripting-gdscript-export-tool-button-annotation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ subsection: gdscript
55
rank: 0
66
importance: 2
77
anchor: "export-tool-button-annotation"
8-
title: "@export_tool_button annotation"
8+
title: "<span class='highlight gdscript-annotation'>@export_tool_button</span> annotation"
99
blockquote: "On the button"
1010
text: |
1111
The tool developers amongst you asked and our contributors delivered:
1212
13-
You can now create buttons in the inspector from @tool scripts.
13+
You can now create buttons in the inspector from <span class='highlight gdscript-annotation'>@tool</span> scripts.
1414
contributors:
1515
- name: jordi
1616
github: jordi-star
@@ -20,5 +20,7 @@ contributors:
2020
github: fire
2121
- name: Danil Alexeev
2222
github: dalexeev
23-
read_more: https://github.com/godotengine/godot/pull/96290
23+
- name: Paul Joannon
24+
github: paulloz
25+
read_more: https://github.com/godotengine/godot/issues?q=is%3Apr%20state%3Amerged%2096290%2097894
2426
---

pages/releases/_includes/feature.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="release-card-content-container">
3535
<!-- .c-title -->
3636
<h4 class="c-title">
37-
<a href="#{{feature.anchor}}">{{feature.title}}</a>
37+
<a href="#{{feature.anchor}}">{{feature.title | markdownify}}</a>
3838
</h4>
3939

4040
<!-- .c-blockquote -->

0 commit comments

Comments
 (0)