mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
Merge pull request #2568 from Totopo27/fix/gh-2563-extra-extensions-jinja2
fix(discover): map jinja and jinja2 in userconfig language table
This commit is contained in:
2 files changed
+4
-1
No files matched your search
@@ -168,6 +168,8 @@ static const lang_name_entry_t LANG_NAME_TABLE[] = {
|
||||
{"form", CBM_LANG_FORM},
|
||||
{"magma", CBM_LANG_MAGMA},
|
||||
{"wolfram", CBM_LANG_WOLFRAM},
|
||||
{"jinja2", CBM_LANG_JINJA2},
|
||||
{"jinja", CBM_LANG_JINJA2},
|
||||
};
|
||||
|
||||
#define LANG_NAME_TABLE_SIZE (sizeof(LANG_NAME_TABLE) / sizeof(LANG_NAME_TABLE[0]))
|
||||
|
||||
@@ -39,7 +39,7 @@ TEST(userconfig_project_basic) {
|
||||
char proj[512];
|
||||
snprintf(proj, sizeof(proj), "%s/.codebase-memory.json", dir);
|
||||
ASSERT_EQ(
|
||||
write_json(proj, "{\"extra_extensions\":{\".blade.php\":\"php\",\".mjs\":\"javascript\"}}"),
|
||||
write_json(proj, "{\"extra_extensions\":{\".blade.php\":\"php\",\".mjs\":\"javascript\",\".html\":\"jinja2\"}}"),
|
||||
0);
|
||||
|
||||
cbm_userconfig_t *cfg = cbm_userconfig_load(dir);
|
||||
@@ -47,6 +47,7 @@ TEST(userconfig_project_basic) {
|
||||
|
||||
ASSERT_EQ(cbm_userconfig_lookup(cfg, ".blade.php"), CBM_LANG_PHP);
|
||||
ASSERT_EQ(cbm_userconfig_lookup(cfg, ".mjs"), CBM_LANG_JAVASCRIPT);
|
||||
ASSERT_EQ(cbm_userconfig_lookup(cfg, ".html"), CBM_LANG_JINJA2);
|
||||
ASSERT_EQ(cbm_userconfig_lookup(cfg, ".go"), CBM_LANG_COUNT); /* not in user config */
|
||||
|
||||
cbm_userconfig_free(cfg);
|
||||
|
||||
Reference in new issue
Block a user