Expand description
Codetag finder implementation based on PEP 350.
This module provides a Codetag finder that extracts codetags (TODO, FIXME, etc.)
from source code comments.
§Example
use squeeze::{codetag::Codetag, Finder};
let mut finder = Codetag::default();
finder.add_mnemonic("TODO");
finder.build_mnemonics_regex().unwrap();
let text = "// TODO: implement this feature";
if let Some(range) = finder.find(text) {
assert_eq!(&text[range], "TODO: implement this feature");
}Structs§
- Codetag
- A finder that extracts codetags (TODO, FIXME, etc.) from text.