| 1609 | } |
| 1610 | |
| 1611 | int cbm_classify_string(const char *str, int len) { |
| 1612 | if (!str || len < PAIR_LEN) { |
| 1613 | return NOT_FOUND; |
| 1614 | } |
| 1615 | |
| 1616 | if (is_url_like(str, len)) { |
| 1617 | return CBM_STRREF_URL; |
| 1618 | } |
| 1619 | if (has_config_extension(str, len)) { |
| 1620 | return CBM_STRREF_CONFIG; |
| 1621 | } |
| 1622 | if (is_env_var_pattern(str, len)) { |
| 1623 | return CBM_STRREF_CONFIG; |
| 1624 | } |
| 1625 | |
| 1626 | return NOT_FOUND; |
| 1627 | } |
| 1628 | |
| 1629 | /* Flatten a JS/TS `template_string` node into plain text (issue #1006). |
| 1630 | * String fragments are kept verbatim; each ${...} substitution becomes the |
no test coverage detected