Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ For reference here are the sizes associated with their different functions

| function | `two-face` (KiB) | `syntect` (KiB) |
| ---: | ---: | ---: |
| [`acknowledgement::listing()`](https://docs.rs/two-face/latest/two_face/acknowledgement/fn.listing.html) | 10 | - |
| [`syntax::extra_newlines()`](https://docs.rs/two-face/latest/two_face/syntax/fn.extra_newlines.html) (onig) | 939 | 360 |
| ^^ (fancy) | 884 | ^^ |
| [`syntax::extra_no_newlines()`](https://docs.rs/two-face/latest/two_face/syntax/fn.extra_no_newlines.html) (onig) | 938 | 359 |
| ^^ (fancy) | 883 | ^^ |
| [`acknowledgement::listing()`](https://docs.rs/two-face/latest/two_face/acknowledgement/fn.listing.html) | 11 | - |
| [`syntax::extra_newlines()`](https://docs.rs/two-face/latest/two_face/syntax/fn.extra_newlines.html) (onig) | 961 | 360 |
| ^^ (fancy) | 905 | ^^ |
| [`syntax::extra_no_newlines()`](https://docs.rs/two-face/latest/two_face/syntax/fn.extra_no_newlines.html) (onig) | 959 | 359 |
| ^^ (fancy) | 904 | ^^ |
| [`theme::extra()`](https://docs.rs/two-face/latest/two_face/theme/index.html) | 62 | 5 |

In short the syntax definitions are the real chonky part, and if you're
Expand Down Expand Up @@ -124,7 +124,7 @@ The full listing of all syntaxes included in [`two_face::syntax`](https://docs.r
| R | R†, Racket, Rd†, Rego, Regular Expression†, Requirements.txt, reStructuredText†, Robot Framework, Ruby†, Ruby Haml†, Ruby on Rails†, Ruby Slim, Rust† |
| S | Sass\*, Scala†, SCSS, Salt State SLS\*, SML, Solidity, SQL†, Strace, Stylus, Svelte, Swift, SystemVerilog |
| T | Tcl†, Terraform, TeX†, Textile†, Todo.txt, TOML, TypeScript, TypescriptReact, Typst |
| V | Varlink, Verilog, VimL, Vue, Vyper |
| V | Varlink, Verilog, VHDL, VimL, Vue, Vyper |
| W | WGSL |
| X | XML† |
| Y | YAML† |
Expand Down
2 changes: 1 addition & 1 deletion bat
Submodule bat updated 110 files
Binary file modified generated/acknowledgements_full.bin
Binary file not shown.
804 changes: 794 additions & 10 deletions generated/acknowledgements_full.md

Large diffs are not rendered by default.

Binary file modified generated/syntaxes-fancy-newlines.bin
Binary file not shown.
Binary file modified generated/syntaxes-fancy-no-newlines.bin
Binary file not shown.
Binary file modified generated/syntaxes-onig-newlines.bin
Binary file not shown.
Binary file modified generated/syntaxes-onig-no-newlines.bin
Binary file not shown.
Binary file modified generated/themes.bin
Binary file not shown.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
//!
//! | function | `two-face` (KiB) | `syntect` (KiB) |
//! | ---: | ---: | ---: |
//! | [`acknowledgement::listing()`] | 10 | - |
//! | [`syntax::extra_newlines()`] (onig) | 939 | 360 |
//! | ^^ (fancy) | 884 | ^^ |
//! | [`syntax::extra_no_newlines()`] (onig) | 938 | 359 |
//! | ^^ (fancy) | 883 | ^^ |
//! | [`acknowledgement::listing()`] | 11 | - |
//! | [`syntax::extra_newlines()`] (onig) | 961 | 360 |
//! | ^^ (fancy) | 905 | ^^ |
//! | [`syntax::extra_no_newlines()`] (onig) | 959 | 359 |
//! | ^^ (fancy) | 904 | ^^ |
//! | [`theme::extra()`] | 62 | 5 |
//!
//! In short the syntax definitions are the real chonky part, and if you're
Expand Down Expand Up @@ -117,7 +117,7 @@
//! | R | R†, Racket, Rd†, Rego, Regular Expression†, Requirements.txt, reStructuredText†, Robot Framework, Ruby†, Ruby Haml†, Ruby on Rails†, Ruby Slim, Rust† |
//! | S | Sass\*, Scala†, SCSS, Salt State SLS\*, SML, Solidity, SQL†, Strace, Stylus, Svelte, Swift, SystemVerilog |
//! | T | Tcl†, Terraform, TeX†, Textile†, Todo.txt, TOML, TypeScript, TypescriptReact, Typst |
//! | V | Varlink, Verilog, VimL, Vue, Vyper |
//! | V | Varlink, Verilog, VHDL, VimL, Vue, Vyper |
//! | W | WGSL |
//! | X | XML† |
//! | Y | YAML† |
Expand Down
12 changes: 6 additions & 6 deletions src/theme/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,24 @@ pub enum EmbeddedThemeName {
/// Catppuccin Frappe
///
/// <pre style="background-color:#303446;">
/// <span style="color:#737994;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="color:#737994;"># So the following is suggested
/// <span style="font-style:italic;color:#7c7f93;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="font-style:italic;color:#7c7f93;"># So the following is suggested
/// </span><span style="color:#a6d189;">&quot;</span><span style="color:#a6d189;">no</span><span style="color:#a6d189;">&quot;</span><span style="color:#c6d0f5;"> </span><span style="color:#81c8be;">=</span><span style="color:#c6d0f5;"> </span><span style="color:#ca9ee6;">if</span><span style="color:#c6d0f5;"> </span><span style="color:#ef9f76;">1</span><span style="color:#c6d0f5;"> </span><span style="color:#81c8be;">==</span><span style="color:#c6d0f5;"> </span><span style="color:#ef9f76;">0</span><span style="color:#949cbb;">,</span><span style="color:#c6d0f5;"> </span><span style="color:#c6d0f5;">do</span><span style="color:#949cbb;">:</span><span style="color:#c6d0f5;"> </span><span style="color:#a6d189;">&quot;</span><span style="color:#a6d189;">yes</span><span style="color:#a6d189;">&quot;</span><span style="color:#949cbb;">,</span><span style="color:#c6d0f5;"> </span><span style="color:#c6d0f5;">else</span><span style="color:#949cbb;">:</span><span style="color:#c6d0f5;"> </span><span style="color:#a6d189;">&quot;</span><span style="color:#a6d189;">no</span><span style="color:#a6d189;">&quot;
/// </span></pre>
CatppuccinFrappe,
/// Catppuccin Latte
///
/// <pre style="background-color:#eff1f5;">
/// <span style="font-style:italic;color:#9ca0b0;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="font-style:italic;color:#9ca0b0;"># So the following is suggested
/// <span style="font-style:italic;color:#7c7f93;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="font-style:italic;color:#7c7f93;"># So the following is suggested
/// </span><span style="color:#40a02b;">&quot;no&quot; </span><span style="color:#179299;">= </span><span style="color:#8839ef;">if </span><span style="color:#fe640b;">1 </span><span style="color:#179299;">== </span><span style="color:#fe640b;">0</span><span style="color:#7c7f93;">, </span><span style="color:#4c4f69;">do</span><span style="color:#7c7f93;">: </span><span style="color:#40a02b;">&quot;yes&quot;</span><span style="color:#7c7f93;">, </span><span style="color:#4c4f69;">else</span><span style="color:#7c7f93;">: </span><span style="color:#40a02b;">&quot;no&quot;
/// </span></pre>
CatppuccinLatte,
/// Catppuccin Macchiato
///
/// <pre style="background-color:#24273a;">
/// <span style="font-style:italic;color:#6e738d;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="font-style:italic;color:#6e738d;"># So the following is suggested
/// <span style="font-style:italic;color:#939ab7;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
/// </span><span style="font-style:italic;color:#939ab7;"># So the following is suggested
/// </span><span style="color:#a6da95;">&quot;no&quot; </span><span style="color:#8bd5ca;">= </span><span style="color:#c6a0f6;">if </span><span style="color:#f5a97f;">1 </span><span style="color:#8bd5ca;">== </span><span style="color:#f5a97f;">0</span><span style="color:#939ab7;">, </span><span style="color:#cad3f5;">do</span><span style="color:#939ab7;">: </span><span style="color:#a6da95;">&quot;yes&quot;</span><span style="color:#939ab7;">, </span><span style="color:#cad3f5;">else</span><span style="color:#939ab7;">: </span><span style="color:#a6da95;">&quot;no&quot;
/// </span></pre>
CatppuccinMacchiato,
Expand Down
31 changes: 30 additions & 1 deletion tests/acknowledgements/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn full_matches_prebuilt() {
<summary>syntaxes/02_Extra/Groff/LICENSE</summary>

````text
@@ -1918,6 +1986,38 @@
@@ -2473,6 +2541,38 @@
</details>

<details>
Expand Down Expand Up @@ -132,6 +132,35 @@ fn full_matches_prebuilt() {
+<details>
<summary>syntaxes/02_Extra/PureScript/NOTICE</summary>

````text
@@ -3964,6 +4064,28 @@
</details>

<details>
+<summary>themes/github-sublime-theme/LICENSE</summary>
+
+````text
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2024 Alexander Ekdahl
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
+
+````
+</details>
+
+<details>
<summary>themes/gruvbox/LICENSE</summary>

````text
"#);
}
35 changes: 19 additions & 16 deletions tests/docs_watchdog/readme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,22 @@ fn embedded_asset_sizes() {
insta::assert_snapshot!(
table,
@r"
| function | `two-face` (KiB) | `syntect` (KiB) |
| ---: | ---: | ---: |
| [`acknowledgement::listing()`] | 10 | - |
| [`syntax::extra_newlines()`] (onig) | 939 | 360 |
| ^^ (fancy) | 884 | ^^ |
| [`syntax::extra_no_newlines()`] (onig) | 938 | 359 |
| ^^ (fancy) | 883 | ^^ |
| [`theme::extra()`] | 62 | 5 |
"
| function | `two-face` (KiB) | `syntect` (KiB) |
| ---: | ---: | ---: |
| [`acknowledgement::listing()`] | 11 | - |
| [`syntax::extra_newlines()`] (onig) | 961 | 360 |
| ^^ (fancy) | 905 | ^^ |
| [`syntax::extra_no_newlines()`] (onig) | 959 | 359 |
| ^^ (fancy) | 904 | ^^ |
| [`theme::extra()`] | 62 | 5 |
"
);
}

#[rustfmt::skip]
const EXPECTED: &[&str] = &[
// A
"ActionScript", "Ada", "Apache Conf", "AppleScript", "AsciiDoc (Asciidoctor)",
"Assembly (x86_64)", "ASP", "AWK",
"ActionScript", "Ada", "Apache Conf", "AppleScript", "AsciiDoc (Asciidoctor)", "ASP", "AWK",
// B
"Bourne Again Shell (bash)", "Batch File", "BibTeX",
// C
Expand All @@ -78,7 +77,7 @@ const EXPECTED: &[&str] = &[
// K
"Kotlin",
// L
"LaTeX", "LaTeX Log", "Lean", "Less", "Lisp", "Literate Haskell", "LLVM", "Lua",
"LaTeX", "LaTeX Log", "Less", "Lisp", "Literate Haskell", "LLVM", "Lua",
// M
"Makefile", "Manpage", "Markdown", "MATLAB", "MediaWiki", "MultiMarkdown",
// N
Expand All @@ -100,11 +99,11 @@ const EXPECTED: &[&str] = &[
"Tcl", "Terraform", "TeX", "Textile", "Todo.txt", "TOML", "TypeScript", "TypeScriptReact",
"Typst",
// V
"varlink", "Verilog", "VimL", "Vyper",
"varlink", "Verilog", "VHDL", "VimL", "Vyper",
// W
"WGSL",
// X
"XML",
"x86_64 Assembly", "XML",
// Y
"YAML",
// Z
Expand All @@ -113,7 +112,7 @@ const EXPECTED: &[&str] = &[
// -- Not worth displaying in docs --

// Various linux files
"CpuInfo", "fstab", "group", "hosts", "MemInfo", "passwd", "resolv",
"CpuInfo", "fstab", "group", "MemInfo", "passwd", "resolv",
// Cmake stuff beyond the base
"CMakeCache", "CMake C Header", "CMake C++ Header",
// Fortran stuff beyond the base
Expand All @@ -126,10 +125,14 @@ const EXPECTED: &[&str] = &[
// CSV-like
"Pipe Separated Values", "Semi-Colon Separated Values", "Separated Values",
"Tab Separated Values",
// Go stuff beyond the base
"Gomod", "Gosum",
// Lean stuff beyond the base
"Lean 4",
// Misc
"Java Properties", "JavaScript (Rails)", "jsonnet", "Vue Component", "camlp4", "Plain Text",
"R Console", "SQL (Rails)", "Protocol Buffer (TEXT)", "gnuplot", "HTTP Request and Response",
"log", "syslog", "Highlight non-printables", "Dockerfile (with bash)",
"log", "syslog", "Highlight non-printables", "Dockerfile (with bash)", "Hosts File",
];

/// Some syntax definitions use regex features that aren't supported by `fancy-regex`
Expand Down
16 changes: 8 additions & 8 deletions tests/docs_watchdog/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ fn catppuccin_frappe() {
sample_html(EmbeddedThemeName::CatppuccinFrappe),
@r#"
<pre style="background-color:#303446;">
<span style="font-style:italic;color:#737994;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#737994;"># So the following is suggested
<span style="font-style:italic;color:#949cbb;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#949cbb;"># So the following is suggested
</span><span style="color:#a6d189;">&quot;no&quot; </span><span style="color:#81c8be;">= </span><span style="color:#ca9ee6;">if </span><span style="color:#ef9f76;">1 </span><span style="color:#81c8be;">== </span><span style="color:#ef9f76;">0</span><span style="color:#949cbb;">, </span><span style="color:#c6d0f5;">do</span><span style="color:#949cbb;">: </span><span style="color:#a6d189;">&quot;yes&quot;</span><span style="color:#949cbb;">, </span><span style="color:#c6d0f5;">else</span><span style="color:#949cbb;">: </span><span style="color:#a6d189;">&quot;no&quot;
</span></pre>
"#
Expand All @@ -131,8 +131,8 @@ fn catppuccin_latte() {
insta::assert_snapshot!(sample_html(EmbeddedThemeName::CatppuccinLatte),
@r#"
<pre style="background-color:#eff1f5;">
<span style="font-style:italic;color:#9ca0b0;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#9ca0b0;"># So the following is suggested
<span style="font-style:italic;color:#7c7f93;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#7c7f93;"># So the following is suggested
</span><span style="color:#40a02b;">&quot;no&quot; </span><span style="color:#179299;">= </span><span style="color:#8839ef;">if </span><span style="color:#fe640b;">1 </span><span style="color:#179299;">== </span><span style="color:#fe640b;">0</span><span style="color:#7c7f93;">, </span><span style="color:#4c4f69;">do</span><span style="color:#7c7f93;">: </span><span style="color:#40a02b;">&quot;yes&quot;</span><span style="color:#7c7f93;">, </span><span style="color:#4c4f69;">else</span><span style="color:#7c7f93;">: </span><span style="color:#40a02b;">&quot;no&quot;
</span></pre>
"#
Expand All @@ -144,8 +144,8 @@ fn catppuccin_macchiato() {
insta::assert_snapshot!(sample_html(EmbeddedThemeName::CatppuccinMacchiato),
@r#"
<pre style="background-color:#24273a;">
<span style="font-style:italic;color:#6e738d;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#6e738d;"># So the following is suggested
<span style="font-style:italic;color:#939ab7;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#939ab7;"># So the following is suggested
</span><span style="color:#a6da95;">&quot;no&quot; </span><span style="color:#8bd5ca;">= </span><span style="color:#c6a0f6;">if </span><span style="color:#f5a97f;">1 </span><span style="color:#8bd5ca;">== </span><span style="color:#f5a97f;">0</span><span style="color:#939ab7;">, </span><span style="color:#cad3f5;">do</span><span style="color:#939ab7;">: </span><span style="color:#a6da95;">&quot;yes&quot;</span><span style="color:#939ab7;">, </span><span style="color:#cad3f5;">else</span><span style="color:#939ab7;">: </span><span style="color:#a6da95;">&quot;no&quot;
</span></pre>
"#
Expand All @@ -157,8 +157,8 @@ fn catppuccin_mocha() {
insta::assert_snapshot!(sample_html(EmbeddedThemeName::CatppuccinMocha),
@r#"
<pre style="background-color:#1e1e2e;">
<span style="font-style:italic;color:#6c7086;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#6c7086;"># So the following is suggested
<span style="font-style:italic;color:#9399b2;"># There currently is no ternary operator like true ? &quot;yes&quot; : &quot;no&quot;
</span><span style="font-style:italic;color:#9399b2;"># So the following is suggested
</span><span style="color:#a6e3a1;">&quot;no&quot; </span><span style="color:#94e2d5;">= </span><span style="color:#cba6f7;">if </span><span style="color:#fab387;">1 </span><span style="color:#94e2d5;">== </span><span style="color:#fab387;">0</span><span style="color:#9399b2;">, </span><span style="color:#cdd6f4;">do</span><span style="color:#9399b2;">: </span><span style="color:#a6e3a1;">&quot;yes&quot;</span><span style="color:#9399b2;">, </span><span style="color:#cdd6f4;">else</span><span style="color:#9399b2;">: </span><span style="color:#a6e3a1;">&quot;no&quot;
</span></pre>
"#
Expand Down
12 changes: 12 additions & 0 deletions xtask/src/gen/acknowledgements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ fn load_acknowledgements(
.join("NOTICE"),
0x432a39028e111f67,
),
// the Lean submodule includes a vs-code plugin with assets that are not included in this
// library's assets
(
Path::new("syntaxes")
.join("02_Extra")
.join("Lean")
.join("vscode-lean4")
.join("media")
.join("diagnostic-gutter-icons")
.join("LICENSE"),
0xa1a501a99de80480,
),
]
.into_iter()
.collect();
Expand Down