From 67d00fb1e37c7e2de55ab2aa376a5e57009fb2a9 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Mon, 29 Apr 2024 11:03:51 -0700 Subject: [PATCH] fix: reenable syntax highlighting for doc html generator (#23570) This was forgotten to be renabled a while back when we made it optional --- Cargo.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ cli/Cargo.toml | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 29a526ec67..d70b3266f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1399,6 +1399,7 @@ dependencies = [ "regex", "serde", "serde_json", + "syntect", "termcolor", ] @@ -4362,6 +4363,28 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "onig" +version = "6.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" +dependencies = [ + "bitflags 1.3.2", + "libc", + "once_cell", + "onig_sys", +] + +[[package]] +name = "onig_sys" +version = "69.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "opaque-debug" version = "0.3.1" @@ -6480,6 +6503,26 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "syntect" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" +dependencies = [ + "bincode", + "bitflags 1.3.2", + "flate2", + "fnv", + "once_cell", + "onig", + "regex-syntax", + "serde", + "serde_derive", + "serde_json", + "thiserror", + "walkdir", +] + [[package]] name = "tap" version = "1.0.1" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 761be4d069..dba61e18e6 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -67,7 +67,7 @@ deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposa deno_cache_dir = { workspace = true } deno_config = "=0.16.1" deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] } -deno_doc = { version = "=0.128.1", features = ["html"] } +deno_doc = { version = "=0.128.1", features = ["html", "syntect"] } deno_emit = "=0.40.1" deno_graph = { version = "=0.74.0", features = ["tokio_executor"] } deno_lint = { version = "=0.58.4", features = ["docs"] }