[language-gfm] Change scope for a horizontal rule…

to `markup.horizontal-rule.gfm` and add styles to all eight built-in syntax themes to account for it.

All the old GFM scopes are just named however they needed to be named in order to produce syntax highlighting to the grammar author, semantics be damned. Instead, we're making sure the semantics are correct, then adapting the syntax themes accordingly.
This commit is contained in:
Andrew Dupont 2024-01-21 13:20:56 -08:00
parent 4c0e7dda9f
commit ee220dd6ef
8 changed files with 48 additions and 0 deletions

View File

@ -229,6 +229,12 @@
&.syntax--italic {
font-style: italic;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: #8A8A8A;
}
}
// /* comment */

View File

@ -198,6 +198,12 @@
&.syntax--italic {
font-style: italic;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: #999988;
}
}
// /* comment */

View File

@ -267,6 +267,12 @@
&.syntax--raw {
color: @green;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @gray;
}
}
.syntax--source.syntax--gfm {

View File

@ -267,6 +267,12 @@
&.syntax--raw {
color: @green;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @gray;
}
}
.syntax--source.syntax--gfm {

View File

@ -320,4 +320,10 @@
&.syntax--raw {
color: @hue-4;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @mono-3;
}
}

View File

@ -320,4 +320,10 @@
&.syntax--raw {
color: @hue-4;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @mono-3;
}
}

View File

@ -37,4 +37,10 @@
color: @syntax-comment-color;
font-style: italic;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @syntax-comment-color;
}
}

View File

@ -37,4 +37,10 @@
color: @syntax-comment-color;
font-style: italic;
}
// Horizontal rules in GFM used to be scoped as `comment.hr`. For continuity,
// we assign the color of a comment to this new scope.
&.syntax--horizontal-rule {
color: @syntax-comment-color;
}
}