From c0e315495c02aa36558e99104b73ecaf321d994d Mon Sep 17 00:00:00 2001 From: edwloef Date: Thu, 12 Mar 2026 10:19:06 +0100 Subject: [PATCH 1/2] invert priorities in file type guess --- src/file_type_config.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file_type_config.zig b/src/file_type_config.zig index a444d04f..847c21ab 100644 --- a/src/file_type_config.zig +++ b/src/file_type_config.zig @@ -167,13 +167,12 @@ pub fn guess_file_type(file_path: ?[]const u8, content: []const u8) ?@This() { } fn guess(file_path: ?[]const u8, content: []const u8) ?@This() { - if (guess_first_line(content)) |ft| return ft; for (get_all_names()) |file_type_name| { const file_type = get(file_type_name) catch unreachable orelse unreachable; if (file_path) |fp| if (syntax.FileType.match_file_type(file_type.extensions orelse continue, fp)) return file_type; } - return null; + return guess_first_line(content); } fn guess_first_line(content: []const u8) ?@This() { From fb19d50c20d89310976a85e7894bd62ebe022e7d Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 24 Mar 2026 13:53:46 +0100 Subject: [PATCH 2/2] fix: update flow-syntax to get tree-sitter-markdown fix for serialization buffer overflow --- build.zig.zon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 6494c0ee..095e111d 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -6,8 +6,8 @@ .dependencies = .{ .syntax = .{ - .url = "git+https://github.com/neurocyte/flow-syntax?ref=master#272a2d0b01f708dcd02d43c2ed997fd7b82d6224", - .hash = "flow_syntax-0.7.2-X8jOoeFTAQAHSg9vmbAahKdrA8DDf0N-MJl8l09vMDZh", + .url = "git+https://github.com/neurocyte/flow-syntax?ref=master#56929f0c523b59153e17919be2cd09d8bef32cd0", + .hash = "flow_syntax-0.7.2-X8jOoeFTAQBeP2Tn08Tw1jsMdifLEDBgPLqPqNelAupy", }, .flags = .{ .url = "git+https://github.com/neurocyte/flags?ref=main#984b27948da3e4e40a253f76c85b51ec1a9ada11",