Expand description
Shared markdown file discovery semantics.
The CLI walker (file_processor::discovery in the binary crate) and the
LSP workspace index scanner answer the same question: which files does
rumdl process here? The pieces of that answer that must never diverge
live in this module:
- the markdown extension set and how it is matched,
- how ignore-file handling (
.gitignore,.markdownlintignore, hidden entries) is configured on a walker, - how
excludepatterns from config are expanded and matched.
Callers still differ deliberately: the LSP skips .git/node_modules/
target outright as an editor-performance safety net, while the CLI
walks whatever gitignore semantics allow.
Structs§
- Exclude
Matchers - Compiled
excludepatterns with directory-pattern expansion applied. - Markdown
Walk Options - Ignore-handling options applied to a markdown discovery walk.
Constants§
- MARKDOWN_
EXTENSIONS - File extensions rumdl treats as markdown, lowercase.
Functions§
- apply_
markdown_ walk_ options - Apply the shared ignore-handling configuration to a walker.
- expand_
directory_ pattern - Expands directory-style patterns to also match files within them. Pattern “dir/path” becomes [“dir/path”, “dir/path/**”] to match both the directory itself and all contents recursively.
- has_
markdown_ extension - Whether
pathhas a markdown extension. - is_
markdown_ extension - Whether
extis a markdown extension. Matches case-insensitively so conventional variants likeRmd(and shouting-caseMD) qualify. - markdown_
walk_ builder - Build a walker over
rootconfigured with the shared options. - path_
relative_ to - Relativize
pathagainstbasefor exclude-pattern matching, canonicalizing both sides so symlinks (e.g. macOS/tmp) and Windows path-representation differences don’t defeat the prefix strip. ReturnsNonewhenpathis not underbase.