Add tests for broken export blocks.
This commit is contained in:
parent
fa4766b64e
commit
cdcaae11c4
3
org_mode_samples/lesser_block/export_with_no_data.org
Normal file
3
org_mode_samples/lesser_block/export_with_no_data.org
Normal file
@ -0,0 +1,3 @@
|
||||
#+begin_export
|
||||
This would be LaTeX code.
|
||||
#+end_export
|
3
org_mode_samples/lesser_block/export_with_two_words.org
Normal file
3
org_mode_samples/lesser_block/export_with_two_words.org
Normal file
@ -0,0 +1,3 @@
|
||||
#+begin_export latex html
|
||||
This would be LaTeX code.
|
||||
#+end_export
|
@ -173,7 +173,7 @@ pub fn export_block<'r, 's>(
|
||||
input: &'s str,
|
||||
) -> Res<&'s str, ExportBlock<'s>> {
|
||||
let (remaining, name) = lesser_block_begin("export")(context, input)?;
|
||||
// TODO: Data is mandatory and must be a single word
|
||||
// https://orgmode.org/worg/org-syntax.html#Blocks claims that export blocks must have a single word for data but testing shows no data and multi-word data still parses as an export block.
|
||||
let (remaining, parameters) = opt(tuple((space1, data)))(remaining)?;
|
||||
let (remaining, _nl) = line_ending(remaining)?;
|
||||
let lesser_block_end_specialized = lesser_block_end("export");
|
||||
|
Loading…
Reference in New Issue
Block a user