From 4a863e92ff44febcc28e709f8421ed74b105653a Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 25 Mar 2023 13:25:20 -0400 Subject: [PATCH] Add a test case showing only paragraphs exist on the first line for plain lists. --- .../{README.org => README.txt} | 0 .../plain_lists/start_nested_list_same_line.README.txt | 1 + .../plain_lists/start_nested_list_same_line.org | 4 ++++ src/parser/plain_list.rs | 10 ++++++++++ 4 files changed, 15 insertions(+) rename org_mode_samples/exit_matcher_investigation/{README.org => README.txt} (100%) create mode 100644 org_mode_samples/plain_lists/start_nested_list_same_line.README.txt create mode 100644 org_mode_samples/plain_lists/start_nested_list_same_line.org diff --git a/org_mode_samples/exit_matcher_investigation/README.org b/org_mode_samples/exit_matcher_investigation/README.txt similarity index 100% rename from org_mode_samples/exit_matcher_investigation/README.org rename to org_mode_samples/exit_matcher_investigation/README.txt diff --git a/org_mode_samples/plain_lists/start_nested_list_same_line.README.txt b/org_mode_samples/plain_lists/start_nested_list_same_line.README.txt new file mode 100644 index 00000000..42532822 --- /dev/null +++ b/org_mode_samples/plain_lists/start_nested_list_same_line.README.txt @@ -0,0 +1 @@ +Seems like the only element that can exist on the same line as the opening of an item is a paragraph. Perhaps all other elements should have a start of line matcher at the beginning of their parser to force this? diff --git a/org_mode_samples/plain_lists/start_nested_list_same_line.org b/org_mode_samples/plain_lists/start_nested_list_same_line.org new file mode 100644 index 00000000..ece6657a --- /dev/null +++ b/org_mode_samples/plain_lists/start_nested_list_same_line.org @@ -0,0 +1,4 @@ +1. regular + 1. nested list +2. 1. Sameline +3. | table| diff --git a/src/parser/plain_list.rs b/src/parser/plain_list.rs index 8b137891..4c2040df 100644 --- a/src/parser/plain_list.rs +++ b/src/parser/plain_list.rs @@ -1 +1,11 @@ +use super::error::Res; +use super::lesser_element::Paragraph; +use super::Context; +#[allow(dead_code)] +pub fn plain_list_item<'r, 's>( + context: Context<'r, 's>, + input: &'s str, +) -> Res<&'s str, Paragraph<'s>> { + todo!() +}