diff --git a/src/discover/userconfig.c b/src/discover/userconfig.c index 8f906ef07..8671d08fd 100644 --- a/src/discover/userconfig.c +++ b/src/discover/userconfig.c @@ -164,6 +164,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])) diff --git a/tests/test_userconfig.c b/tests/test_userconfig.c index a9c3b4a5e..10eacec1b 100644 --- a/tests/test_userconfig.c +++ b/tests/test_userconfig.c @@ -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);