Skip to content

Commit

Permalink
don't parse plugin.lua in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emuell committed Jul 30, 2024
1 parent 72f0826 commit 724eeb3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions generate/src/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ impl Source {
} else {
Ok(Some(Source::Folder(sources)))
}
} else if path
.extension()
.is_some_and(|e| e.eq_ignore_ascii_case("lua"))
&& path
.file_name()
.is_some_and(|f| !f.eq_ignore_ascii_case("plugin.lua"))
{
Ok(Some(Source::File(path.to_path_buf())))
} else {
path.extension().map_or(Ok(None), |ext| {
Ok(if ext == "lua" {
Some(Source::File(path.to_path_buf()))
} else {
None
})
})
Ok(None)
}
}

Expand Down

0 comments on commit 724eeb3

Please sign in to comment.