Add a test showing a text markup condition we are not handling and significantly reduce allocations by using references for the captured marker for text markup.

This commit is contained in:
Tom Alexander 2023-09-21 22:35:09 -04:00
parent 129228c5c5
commit 49e3c90a3a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 2 additions and 2 deletions

View File

@ -0,0 +1 @@
foo ** bar ** baz

View File

@ -163,8 +163,7 @@ fn text_markup_object<'c>(
OrgSource<'s>,
) -> Res<OrgSource<'s>, Vec<Object<'s>>>
+ 'c {
let marker_symbol = marker_symbol.to_owned();
move |context, input: OrgSource<'_>| _text_markup_object(context, input, marker_symbol.as_str())
move |context, input: OrgSource<'_>| _text_markup_object(context, input, marker_symbol)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]