mirror of
https://github.com/orhun/systeroid
synced 2024-10-04 14:39:06 +00:00
feat(sysctl): improve the documentation updater
This commit is contained in:
parent
297dc220ba
commit
905841aebd
|
@ -108,7 +108,11 @@ impl Sysctl {
|
|||
.iter()
|
||||
.filter(|document| Section::from(document.path.as_path()) == param.section)
|
||||
{
|
||||
if let Some(paragraph) =
|
||||
if let Some(paragraph) = document
|
||||
.paragraphs
|
||||
.par_iter()
|
||||
.find_first(|paragraph| param.get_absolute_name() == Some(¶graph.title))
|
||||
.or_else(|| {
|
||||
document.paragraphs.par_iter().find_first(|paragraph| {
|
||||
match param.get_absolute_name() {
|
||||
Some(absolute_name) => {
|
||||
|
@ -118,6 +122,7 @@ impl Sysctl {
|
|||
_ => false,
|
||||
}
|
||||
})
|
||||
})
|
||||
{
|
||||
param.description = Some(paragraph.contents.to_owned());
|
||||
param.docs_title = paragraph.title.to_owned();
|
||||
|
|
Loading…
Reference in a new issue