diff --git a/org_mode_samples/lesser_block/export_with_no_data.org b/org_mode_samples/lesser_block/export_with_no_data.org new file mode 100644 index 0000000..db2940e --- /dev/null +++ b/org_mode_samples/lesser_block/export_with_no_data.org @@ -0,0 +1,3 @@ +#+begin_export +This would be LaTeX code. +#+end_export diff --git a/org_mode_samples/lesser_block/export_with_two_words.org b/org_mode_samples/lesser_block/export_with_two_words.org new file mode 100644 index 0000000..661f739 --- /dev/null +++ b/org_mode_samples/lesser_block/export_with_two_words.org @@ -0,0 +1,3 @@ +#+begin_export latex html +This would be LaTeX code. +#+end_export diff --git a/src/parser/lesser_block.rs b/src/parser/lesser_block.rs index e330840..a7db16a 100644 --- a/src/parser/lesser_block.rs +++ b/src/parser/lesser_block.rs @@ -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");