From 3840387e6a98b423c90e8fa9ba70ee844263476f Mon Sep 17 00:00:00 2001 From: KuaaMU <138859253+KuaaMU@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:57:16 +0800 Subject: [PATCH] fix: add .m extension to EXT_TABLE for content-based disambiguation The .m extension was missing from EXT_TABLE, causing detect_file_language to return CBM_LANG_COUNT (Unknown) before the content-based disambiguation logic (cbm_disambiguate_m) could ever run. This made .m files invisible to the indexer. Add {".m", CBM_LANG_MATLAB} to EXT_TABLE so the initial lookup succeeds, allowing the subsequent cbm_disambiguate_m call to correctly determine whether the file is MATLAB, Objective-C, or Magma. Fixes #296 --- src/discover/language.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/discover/language.c b/src/discover/language.c index 951597c5..7e9d98f4 100644 --- a/src/discover/language.c +++ b/src/discover/language.c @@ -174,6 +174,7 @@ static const ext_entry_t EXT_TABLE[] = { {".mdx", CBM_LANG_MARKDOWN}, /* MATLAB */ + {".m", CBM_LANG_MATLAB}, {".matlab", CBM_LANG_MATLAB}, {".mlx", CBM_LANG_MATLAB},