Skip to content

Commit b0868cd

Browse files
committed
fiddle with relevance values;
The IR introspection macros can spit out lots of Julia code; it is a very strong signal though that we want REPL syntaxes, though.
1 parent ad47d6e commit b0868cd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

javascripts/discourse/api-initializers/theme-initializer.gjs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -681,28 +681,28 @@ function juliaIR(hljs) {
681681
{
682682
scope: "variable",
683683
match: /%\d+/,
684-
relevance: 10,
684+
relevance: 0,
685685
},
686686

687687
// Basic block labels (1 ─, 2 ┄, etc.) and box drawing
688688
{
689689
scope: "section",
690690
match: /^\s*\d*[ ─│╻╷└┃┌┄]+/,
691-
relevance: 8,
691+
relevance: 2,
692692
},
693693

694694
// Control flow labels (#1, #2, etc.)
695695
{
696696
scope: "symbol",
697697
match: /#\d+/,
698-
relevance: 5,
698+
relevance: 0,
699699
},
700700

701701
// Warned type annotations
702702
{
703703
scope: "type.unstable",
704704
match: /::(Any|Box)\b/,
705-
relevance: 8,
705+
relevance: 0,
706706
},
707707

708708
// CodeInfo wrapper
@@ -711,7 +711,7 @@ function juliaIR(hljs) {
711711
begin: /\bCodeInfo\s*\(/,
712712
end: /$/,
713713
contains: ["self"],
714-
relevance: 10,
714+
relevance: 0,
715715
},
716716
];
717717

@@ -758,7 +758,7 @@ function juliaRepl(hljs) {
758758
{
759759
className: "meta.prompt",
760760
begin: /^julia>(?=\s+@?code_llvm\b)/,
761-
relevance: 15,
761+
relevance: 50,
762762
starts: {
763763
end: /^(?=julia>)/,
764764
returnBegin: true,
@@ -782,7 +782,7 @@ function juliaRepl(hljs) {
782782
{
783783
className: "meta.prompt",
784784
begin: /^julia>(?=\s+@?code_native\b)/,
785-
relevance: 15,
785+
relevance: 50,
786786
starts: {
787787
end: /^(?=julia>)/,
788788
returnBegin: true,
@@ -806,7 +806,7 @@ function juliaRepl(hljs) {
806806
{
807807
className: "meta.prompt",
808808
begin: /^julia>(?=\s+@?code_(typed|lowered|warntype)\b)/,
809-
relevance: 15,
809+
relevance: 100,
810810
starts: {
811811
end: /^(?=julia>)/,
812812
returnBegin: true,
@@ -830,7 +830,7 @@ function juliaRepl(hljs) {
830830
{
831831
className: "meta.prompt",
832832
begin: /^julia>/,
833-
relevance: 10,
833+
relevance: 20,
834834
starts: {
835835
// end the highlighting if we are on a new line and the line does not have at
836836
// least six spaces in the beginning

0 commit comments

Comments
 (0)