| 2305 | } |
| 2306 | |
| 2307 | int cbm_classify_string(const char *str, int len) { |
| 2308 | if (!str || len < PAIR_LEN) { |
| 2309 | return NOT_FOUND; |
| 2310 | } |
| 2311 | |
| 2312 | if (is_url_like(str, len)) { |
| 2313 | return CBM_STRREF_URL; |
| 2314 | } |
| 2315 | if (has_config_extension(str, len)) { |
| 2316 | return CBM_STRREF_CONFIG; |
| 2317 | } |
| 2318 | if (is_env_var_pattern(str, len)) { |
| 2319 | return CBM_STRREF_CONFIG; |
| 2320 | } |
| 2321 | |
| 2322 | return NOT_FOUND; |
| 2323 | } |
| 2324 | |
| 2325 | /* Flatten a JS/TS `template_string` node into plain text (issue #1006). |
| 2326 | * String fragments are kept verbatim; each ${...} substitution becomes the |
no test coverage detected