Trim the trailing space off keywords with values.
All checks were successful
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded

This commit is contained in:
Tom Alexander
2023-09-04 22:15:43 -04:00
parent 1c142b68c6
commit b0392ad6fb
4 changed files with 14 additions and 10 deletions

View File

@@ -54,7 +54,6 @@ use crate::types::Section;
/// Parse a full org-mode document.
///
/// This is the main entry point for Organic. It will parse the full contents of the input string as an org-mode document.
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[allow(dead_code)]
pub fn parse<'s>(input: &'s str) -> Result<Document<'s>, String> {
parse_with_settings(input, &GlobalSettings::default())
@@ -65,7 +64,6 @@ pub fn parse<'s>(input: &'s str) -> Result<Document<'s>, String> {
/// This is the secondary entry point for Organic. It will parse the full contents of the input string as an org-mode document starting with the settings you supplied.
///
/// This will not prevent additional settings from being learned during parsing, for example when encountering a "#+TODO".
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[allow(dead_code)]
pub fn parse_with_settings<'g, 's>(
input: &'s str,
@@ -86,7 +84,6 @@ pub fn parse_with_settings<'g, 's>(
/// Use this entry point when you want to have direct control over the starting context or if you want to use this integrated with other nom parsers. For general-purpose usage, the `parse` and `parse_with_settings` functions are a lot simpler.
///
/// This will not prevent additional settings from being learned during parsing, for example when encountering a "#+TODO".
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
#[allow(dead_code)]
pub fn document<'b, 'g, 'r, 's>(
context: RefContext<'b, 'g, 'r, 's>,