1
0
This commit is contained in:
Rokas Puzonas 2022-08-05 00:11:52 +00:00
parent c077f88e48
commit 6dd410c3a9

View File

@ -3,6 +3,8 @@ use comment_parser::{CommentParser, SyntaxRule};
use ignore::Walk; use ignore::Walk;
use regex::Regex; use regex::Regex;
// TODO: add --ignore and --include support
#[derive(Debug)] #[derive(Debug)]
struct Reminder { struct Reminder {
row: u32, row: u32,
@ -51,7 +53,7 @@ fn list_reminders(path: &Path) -> Option<Vec<Reminder>>
} }
let rules = rules.unwrap(); let rules = rules.unwrap();
let file_contents = fs::read_to_string(path).unwrap(); let file_contents = fs::read_to_string(path).ok()?;
let parser = CommentParser::new(&file_contents, rules); let parser = CommentParser::new(&file_contents, rules);
let mut search_from = 0; let mut search_from = 0;
for comment in parser { for comment in parser {