all captures
This commit is contained in:
parent
6084b9072b
commit
2b2171c61d
|
@ -43,7 +43,7 @@ impl<'a> TeraParser<'a> {
|
||||||
|
|
||||||
fn load_template(&mut self, path: &str, src: &[u8]) -> Result<(), tera::Error> {
|
fn load_template(&mut self, path: &str, src: &[u8]) -> Result<(), tera::Error> {
|
||||||
let str = String::from_utf8_lossy(src).to_string();
|
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) {
|
if let Some(layout_path) = captures.get(2) {
|
||||||
let layout_path = layout_path.as_str();
|
let layout_path = layout_path.as_str();
|
||||||
let path = PathBuf::from(path).parent().map(|p| p.join(layout_path)).unwrap();
|
let path = PathBuf::from(path).parent().map(|p| p.join(layout_path)).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue