From 1e13ab97d217067c5a07fe3084090bda150e4d6e Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Tue, 29 Jul 2025 16:15:20 -0400 Subject: [PATCH 1/2] style the REPL banner --- .../api-initializers/theme-initializer.gjs | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/javascripts/discourse/api-initializers/theme-initializer.gjs b/javascripts/discourse/api-initializers/theme-initializer.gjs index 2fc7714..a7dead6 100644 --- a/javascripts/discourse/api-initializers/theme-initializer.gjs +++ b/javascripts/discourse/api-initializers/theme-initializer.gjs @@ -666,6 +666,55 @@ function juliaRepl(hljs) { subLanguage: "julia", }, }, + // Tag the banner entirely as a comment + { + className: 'comment', + begin: /^ _$/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ _ _ _\(_\)_ \| Documentation: https:\/\/docs.julialang.org$/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ \(_\) \| \(_\) \(_\) \|$/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ _ _ _\| \|_ __ _ \| Type "?" for help, "]?" for Pkg help.$/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ \| \| \| \| \| \| \|\/ _` \| \|$/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ \| \| \|_\| \| \| \| \(_\| \| \|/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^ _\/ \|\\__'_\|_\|_\|\\__'_\| \|/, + end: /$/, + relevance: 10 + }, + { + className: 'comment', + begin: /^\|__\/ \|$/, + end: /$/, + relevance: 10 + } ], // jldoctest Markdown blocks are used in the Julia manual and package docs indicate // code snippets that should be verified when the documentation is built. They can be From 9c8646867d2acde8119ff7b0e4dbaf034988dae2 Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Tue, 29 Jul 2025 16:24:51 -0400 Subject: [PATCH 2/2] prettier --- .../api-initializers/theme-initializer.gjs | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/javascripts/discourse/api-initializers/theme-initializer.gjs b/javascripts/discourse/api-initializers/theme-initializer.gjs index a7dead6..89bd227 100644 --- a/javascripts/discourse/api-initializers/theme-initializer.gjs +++ b/javascripts/discourse/api-initializers/theme-initializer.gjs @@ -668,53 +668,55 @@ function juliaRepl(hljs) { }, // Tag the banner entirely as a comment { - className: 'comment', + className: "comment", begin: /^ _$/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', - begin: /^ _ _ _\(_\)_ \| Documentation: https:\/\/docs.julialang.org$/, + className: "comment", + begin: + /^ _ _ _\(_\)_ \| Documentation: https:\/\/docs.julialang.org$/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', + className: "comment", begin: /^ \(_\) \| \(_\) \(_\) \|$/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', - begin: /^ _ _ _\| \|_ __ _ \| Type "?" for help, "]?" for Pkg help.$/, + className: "comment", + begin: + /^ _ _ _\| \|_ __ _ \| Type "?" for help, "]?" for Pkg help.$/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', + className: "comment", begin: /^ \| \| \| \| \| \| \|\/ _` \| \|$/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', + className: "comment", begin: /^ \| \| \|_\| \| \| \| \(_\| \| \|/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', + className: "comment", begin: /^ _\/ \|\\__'_\|_\|_\|\\__'_\| \|/, end: /$/, - relevance: 10 + relevance: 10, }, { - className: 'comment', + className: "comment", begin: /^\|__\/ \|$/, end: /$/, - relevance: 10 - } + relevance: 10, + }, ], // jldoctest Markdown blocks are used in the Julia manual and package docs indicate // code snippets that should be verified when the documentation is built. They can be