0.7.1: log unresolved content in all cases

This commit is contained in:
🪞👃🪞 2025-04-13 21:49:18 +03:00
parent f33f331a48
commit 34295570a2
7 changed files with 70 additions and 39 deletions

View file

@ -40,20 +40,24 @@ try_from_expr!(<'a, E>: Align<RenderBox<'a, E>>: |state, iter|{
"align/n"|"align/s"|"align/e"|"align/w"|
"align/nw"|"align/sw"|"align/ne"|"align/se" => {
let _ = iter.next().unwrap();
let c = iter.next().expect("no content specified");
let c = state.get_content(&c.value).expect("no content provided");
let content = iter.next().expect("no content specified");
let content = if let Some(content) = state.get_content(&content.value) {
content
} else {
panic!("no content corresponding to {:?}", &content);
};
return Some(match key {
"align/c" => Self::c(c),
"align/x" => Self::x(c),
"align/y" => Self::y(c),
"align/n" => Self::n(c),
"align/s" => Self::s(c),
"align/e" => Self::e(c),
"align/w" => Self::w(c),
"align/nw" => Self::nw(c),
"align/ne" => Self::ne(c),
"align/sw" => Self::sw(c),
"align/se" => Self::se(c),
"align/c" => Self::c(content),
"align/x" => Self::x(content),
"align/y" => Self::y(content),
"align/n" => Self::n(content),
"align/s" => Self::s(content),
"align/e" => Self::e(content),
"align/w" => Self::w(content),
"align/nw" => Self::nw(content),
"align/ne" => Self::ne(content),
"align/sw" => Self::sw(content),
"align/se" => Self::se(content),
_ => unreachable!()
})
},