Handle whitespace after parameters in src blocks.

This commit is contained in:
Tom Alexander 2023-10-05 00:43:03 -04:00
parent da2d7535e8
commit 50a3631b79
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,7 @@
#+begin_src python :exports results
print("foo")
#+end_src
#+begin_src python -n :exports results
print("foo")
#+end_src

View File

@ -390,7 +390,7 @@ enum SwitchState {
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
fn src_parameters<'s>(input: OrgSource<'s>) -> Res<OrgSource<'s>, OrgSource<'s>> {
recognize(is_not("\r\n"))(input)
recognize(many_till(anychar, peek(tuple((space0, line_ending)))))(input)
}
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]