Require table formulas have a value.

This commit is contained in:
Tom Alexander 2023-09-21 14:12:18 -04:00
parent a7e130838d
commit 61c3e6c10e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,7 @@ use nom::combinator::eof;
use nom::combinator::not;
use nom::combinator::peek;
use nom::combinator::recognize;
use nom::combinator::verify;
use nom::multi::many_till;
use nom::sequence::tuple;
@ -116,7 +117,9 @@ pub(crate) fn table_formula_keyword<'b, 'g, 'r, 's>(
_context: RefContext<'b, 'g, 'r, 's>,
input: OrgSource<'s>,
) -> Res<OrgSource<'s>, Keyword<'s>> {
filtered_keyword(table_formula_key)(input)
verify(filtered_keyword(table_formula_key), |kw| {
!kw.value.is_empty()
})(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]