diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:42:11 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:42:11 -0500 |
| commit | 1d632526039271de5b6687cce8ed449914c84471 (patch) | |
| tree | 76d45c7973ec1f130ae241f2d659544b9410c418 /modules/custom-misc.el | |
| parent | 76f58b4fbc1f182293f92485ee0f7b97080037ad (diff) | |
| download | dotemacs-1d632526039271de5b6687cce8ed449914c84471.tar.gz dotemacs-1d632526039271de5b6687cce8ed449914c84471.zip | |
refactor(dirvish): extract cj/--html-file-p; match HTML case-insensitively
`cj/dirvish-open-html-in-eww' inlined a `string-match-p' against `\.html?\=' to decide whether to hand a file to eww. The check was case-sensitive, so `.HTML' fell through to the "Not an HTML file" message even though every browser treats it as HTML. Lift the predicate into `cj/--html-file-p' and bind `case-fold-search' to t so uppercase and mixed-case extensions match. The trailing-`\=' anchor stays so files like `html-thing.org' still don't match.
Seven Normal/Boundary/Error tests cover lowercase `.html', `.htm', uppercase `.HTML', mixed-case `.Html', embedded `html' (no match), non-html extensions (no match), and no-extension files (no match).
Diffstat (limited to 'modules/custom-misc.el')
0 files changed, 0 insertions, 0 deletions
