Skip to content

Fix/livereload ignore temp files#55

Merged
shenxianpeng merged 3 commits into
mainfrom
fix/livereload-ignore-temp-files
May 9, 2026
Merged

Fix/livereload ignore temp files#55
shenxianpeng merged 3 commits into
mainfrom
fix/livereload-ignore-temp-files

Conversation

@shenxianpeng
Copy link
Copy Markdown
Member

@shenxianpeng shenxianpeng commented Apr 28, 2026

Related Issue

Fixes #

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build / dependency update
  • Other (describe below)

Checklist

  • New tests added for new behavior (if applicable)
  • Documentation updated (if applicable)
  • Release notes docs/about/release-notes.md updated (if applicable)

@github-actions github-actions Bot added the bug Something isn't working label Apr 28, 2026
@shenxianpeng shenxianpeng force-pushed the fix/livereload-ignore-temp-files branch from e722875 to 248cecd Compare April 28, 2026 12:59
Filter out files that match common editor temporary/backup file
patterns in the livereload file watcher callback:

- Files starting with '.' (dotfiles, vim swap files like .foo.md.swp)
- Files ending with '~' (backup files)
- Files matching '#*#' (Emacs auto-save files)

This prevents live reload from being triggered repeatedly by
editor temporary files, which was especially problematic for
vim users where editing .md files creates .foo.md.swp files.

Fixes #2519
Add test cases for:
- Dotfiles (.vim swap, .hidden) not triggering rebuild
- Editor backup files (~ suffix) not triggering rebuild
- Emacs auto-save files (#file#) not triggering rebuild

Refs #2519
@shenxianpeng shenxianpeng force-pushed the fix/livereload-ignore-temp-files branch from 0e1d84a to eeef1ea Compare May 9, 2026 16:52
@shenxianpeng shenxianpeng merged commit e0082f9 into main May 9, 2026
23 checks passed
@shenxianpeng shenxianpeng deleted the fix/livereload-ignore-temp-files branch May 9, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant