From fc512c06894ad8e0aaae9ac8a4a932d7f53f5ee3 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 12 Nov 2024 10:25:33 +0100 Subject: [PATCH] feat: update to latest flow-syntax for julia and swift support --- build.zig.zon | 8 ++++---- src/main.zig | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 8bfe8e8..fdf8c32 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -7,12 +7,12 @@ .hash = "12207ee987ce045596cb992cfb15b0d6d9456e50d4721c3061c69dabc2962053644d", }, .themes = .{ - .url = "https://github.com/neurocyte/flow-themes/releases/download/master-08c07e21c47abe41ebd16ee260438da5b4c2039e/flow-themes.tar.gz", - .hash = "12202be270e675e3b61d96845baad143494539b167bcb8b1ef32659bf146dd85d3e1", + .url = "https://github.com/neurocyte/flow-themes/releases/download/master-5f1ca2fd3c784d430306a5cd1df237681a196333/flow-themes.tar.gz", + .hash = "122095b1a6110b920571c7e49e61c124cd9a164fe9b1b0faa1bd11d04d89822d3304", }, .syntax = .{ - .url = "https://github.com/neurocyte/flow-syntax/archive/dcfa5cdf3f1f48411dc3c7ab8be26b7561673850.tar.gz", - .hash = "1220ea88bb77cba3cf85caeb8002823218503c601f9907ccffbd41329c632596ebc3", + .url = "https://github.com/neurocyte/flow-syntax/archive/3673787e55d4ac7df519d3918a7f9dc8ae4cf1a0.tar.gz", + .hash = "122092ac558d4b62e0850156899146f4335f8aefe082fc03dd62fd0660fac06e9a27", }, .thespian = .{ .url = "https://github.com/neurocyte/thespian/archive/d7dd27116398b17c8ab68327c384885f161d0cc1.tar.gz", diff --git a/src/main.zig b/src/main.zig index 5489158..1a24309 100644 --- a/src/main.zig +++ b/src/main.zig @@ -392,8 +392,8 @@ fn list_themes(writer: Writer) !void { fn set_ansi_style(writer: Writer, style: Theme.Style) Writer.Error!void { const ansi_style = .{ - .foreground = if (style.fg) |color| to_rgb_color(color) else .Default, - .background = if (style.bg) |color| to_rgb_color(color) else .Default, + .foreground = if (style.fg) |color| to_rgb_color(color.color) else .Default, + .background = if (style.bg) |color| to_rgb_color(color.color) else .Default, .font_style = switch (style.fs orelse .normal) { .normal => term.style.FontStyle{}, .bold => term.style.FontStyle.bold, @@ -409,8 +409,8 @@ fn set_ansi_style(writer: Writer, style: Theme.Style) Writer.Error!void { const unset_ansi_style = set_ansi_style; fn write_html_preamble(writer: Writer, style: Theme.Style) !void { - const color = if (style.fg) |color| color else 0; - const background = if (style.bg) |background| background else 0xFFFFFF; + const color = if (style.fg) |color| color.color else 0; + const background = if (style.bg) |background| background.color else 0xFFFFFF; try writer.writeAll("