189189ctags_defs_by_qname : dict [str , set [str ]] = {}
190190header_extensions = {".h" , ".hpp" , ".hh" , ".hxx" }
191191source_extensions = {".c" , ".cc" , ".cpp" , ".cxx" , ".ino" }
192+ skip_extensions = {".md" }
192193
193194def is_header_file (path : str ) -> bool :
194195 return os .path .splitext (path )[1 ].lower () in header_extensions
195196
196197def is_source_file (path : str ) -> bool :
197198 return os .path .splitext (path )[1 ].lower () in source_extensions
198199
200+ def should_skip_file (path : str ) -> bool :
201+ return os .path .splitext (path )[1 ].lower () in skip_extensions
202+
199203def detect_universal_ctags () -> bool :
200204 """
201205 Return True if Universal Ctags is available on PATH.
@@ -496,11 +500,9 @@ def has_build_files_changed(changed_files: list[str]) -> bool:
496500 """
497501 Check if any of the build files have changed.
498502 Supports glob patterns in build_files.
499- Excludes .md files from triggering rebuilds.
500503 """
501504 for file in changed_files :
502- # Skip .md files
503- if file .endswith ('.md' ):
505+ if should_skip_file (file ):
504506 continue
505507
506508 if not component_mode :
@@ -517,10 +519,8 @@ def has_build_files_changed(changed_files: list[str]) -> bool:
517519def has_sketch_build_files_changed (path : str ) -> bool :
518520 """
519521 Check if any of the sketch build files have changed.
520- Excludes .md files from triggering rebuilds.
521522 """
522- # Skip .md files
523- if path .endswith ('.md' ):
523+ if should_skip_file (path ):
524524 return False
525525
526526 if not component_mode :
@@ -614,8 +614,7 @@ def find_affected_sketches(changed_files: list[str]) -> None:
614614 all_examples = []
615615
616616 for file in changed_files :
617- # Skip .md files entirely from dependency analysis
618- if not file .endswith ('.md' ):
617+ if not should_skip_file (file ):
619618 q .put (file )
620619
621620 while not q .empty ():
0 commit comments