5e1bff6b2b
The .txt extension match was winning over the basename check in getLanguageFromPath, returning 'text' instead of 'cmake' for CMakeLists.txt. Reordered the function to check basename special-cases first (mirroring detectLanguageId's structure), so CMakeLists.txt, Dockerfile, .env., .emacs, and justfile all fire before the extension lookup. Rewrote tests to defend observable contracts (special filenames, case handling, lookup ordering) instead of re-stating the EXTENSION_LANG table. Added contract test pinning that CMakeLists.txt resolves to 'cmake' not 'text'. Updated CHANGELOG: moved from ### Added (test-only) to ### Fixed (bug fix).