From d1a7d0b835f14a4f5359d5a6ea5c63f9fa3f1a47 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Apr 2023 16:37:25 -0400 Subject: [PATCH] Show that trailing whitespace belongs to comments. --- org_mode_samples/comment/indented.org | 3 +++ src/parser/comment.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/org_mode_samples/comment/indented.org b/org_mode_samples/comment/indented.org index 4360a35..b98916d 100644 --- a/org_mode_samples/comment/indented.org +++ b/org_mode_samples/comment/indented.org @@ -1,5 +1,8 @@ # Comment # indented line # At the top of the file + + + foo # Another comment diff --git a/src/parser/comment.rs b/src/parser/comment.rs index 8152259..21ad4ab 100644 --- a/src/parser/comment.rs +++ b/src/parser/comment.rs @@ -8,3 +8,8 @@ pub fn comment<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, start_of_line(context, input)?; todo!() } + +fn comment_line<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> { + start_of_line(context, input)?; + todo!() +}