Skip to content

syntax highliting #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pgml-dashboard/src/utils/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl SyntaxHighlighterAdapter for SyntaxHighlighter {
let code = match options.lang {
"postgresql" | "sql" | "postgresql-line-nums" => {
lazy_static! {
static ref SQL_KEYS: [&'static str; 61] = [
static ref SQL_KEYS: [&'static str; 66] = [
"CASCADE",
"INNER ",
"ON ",
Expand Down Expand Up @@ -288,7 +288,7 @@ impl SyntaxHighlighterAdapter for SyntaxHighlighter {
"pgml.predict",
"pgml.transform",
];
static ref SQL_KEYS_REPLACEMENTS: [&'static str; 61] = [
static ref SQL_KEYS_REPLACEMENTS: [&'static str; 66] = [
"<span class=\"syntax-highlight\">CASCADE</span>",
"<span class=\"syntax-highlight\">INNER </span>",
"<span class=\"syntax-highlight\">ON </span>",
Expand Down Expand Up @@ -346,6 +346,11 @@ impl SyntaxHighlighterAdapter for SyntaxHighlighter {
"<strong>pgml.norm_l2</strong>",
"<span class=\"syntax-highlight\">CONCURRENTLY</span>",
"<span class=\"syntax-highlight\">ON</span>\n",
"<span class=\"syntax-highlight\">VALUES</span>",
"<span class=\"syntax-highlight\">@@</span>",
"<span class=\"syntax-highlight\">=></span>",
"<span class=\"syntax-highlight\">GENERATED ALWAYS AS</span>",
"<span class=\"syntax-highlight\">STORED</span>",
"<span class=\"syntax-highlight\">IF NOT EXISTS</span>",
"<strong>pgml.train</strong>",
"<strong>pgml.predict</strong>",
Expand Down