Support reading category from in-buffer-settings.
This commit is contained in:
@@ -191,7 +191,7 @@ fn _document<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
Document {
|
||||
source: source.into(),
|
||||
category: None,
|
||||
category: context.get_global_settings().category.clone(),
|
||||
path: None,
|
||||
zeroth_section,
|
||||
children,
|
||||
|
||||
@@ -111,6 +111,14 @@ pub(crate) fn apply_in_buffer_settings<'g, 's, 'sf>(
|
||||
}
|
||||
}
|
||||
|
||||
// Category
|
||||
for kw in keywords
|
||||
.iter()
|
||||
.filter(|kw| kw.key.eq_ignore_ascii_case("category"))
|
||||
{
|
||||
new_settings.category = Some(kw.value.to_owned());
|
||||
}
|
||||
|
||||
Ok(new_settings)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user