all captures

This commit is contained in:
KitsuneCafe 2024-02-05 15:26:54 -05:00
parent 6084b9072b
commit 2b2171c61d

View file

@ -43,7 +43,7 @@ impl<'a> TeraParser<'a> {
fn load_template(&mut self, path: &str, src: &[u8]) -> Result<(), tera::Error> {
let str = String::from_utf8_lossy(src).to_string();
if let Some(captures) = EXPANSION_RE.captures(&str.as_str()) {
while let Some(captures) = EXPANSION_RE.captures(&str.as_str()) {
if let Some(layout_path) = captures.get(2) {
let layout_path = layout_path.as_str();
let path = PathBuf::from(path).parent().map(|p| p.join(layout_path)).unwrap();