This commit is contained in:
Tom Alexander 2023-09-06 11:48:24 -04:00
parent 028aeb70aa
commit 400f53e440
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,10 @@ impl<'g, 'r, 's> Context<'g, 'r, 's> {
self.global_settings self.global_settings
} }
pub fn with_global_settings<'gg>(&self, new_settings: &'gg GlobalSettings<'gg, 's>) -> Context<'gg, 'r, 's> { pub fn with_global_settings<'gg>(
&self,
new_settings: &'gg GlobalSettings<'gg, 's>,
) -> Context<'gg, 'r, 's> {
Context { Context {
global_settings: new_settings, global_settings: new_settings,
tree: self.tree.clone(), tree: self.tree.clone(),

View File

@ -18,7 +18,6 @@ impl FileAccessInterface for LocalFileAccessInterface {
.map(PathBuf::as_path) .map(PathBuf::as_path)
.map(|pb| pb.join(path)) .map(|pb| pb.join(path))
.unwrap_or_else(|| PathBuf::from(path)); .unwrap_or_else(|| PathBuf::from(path));
eprintln!("Reading file: {}", final_path.display());
Ok(std::fs::read_to_string(final_path)?) Ok(std::fs::read_to_string(final_path)?)
} }
} }

View File

@ -22,7 +22,7 @@ impl<'g, 's> GlobalSettings<'g, 's> {
working_directory: None, working_directory: None,
}, },
in_progress_todo_keywords: BTreeSet::new(), in_progress_todo_keywords: BTreeSet::new(),
complete_todo_keywords: BTreeSet::new() complete_todo_keywords: BTreeSet::new(),
} }
} }
} }

View File

@ -135,8 +135,6 @@ fn document_org_source<'b, 'g, 'r, 's>(
let new_context = context.with_global_settings(&new_settings); let new_context = context.with_global_settings(&new_settings);
let context = &new_context; let context = &new_context;
// TODO: read the keywords into settings and apply them to the GlobalSettings.
let (remaining, document) = let (remaining, document) =
_document(context, input).map(|(rem, out)| (Into::<&str>::into(rem), out))?; _document(context, input).map(|(rem, out)| (Into::<&str>::into(rem), out))?;
{ {