diff --git a/README.md b/README.md index cfd8c14..2464309 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Org::parse_custom( ## Iter -`Org::iter` function will returns an iteractor of `Event`s, which is +`Org::iter` function will returns an iterator of `Event`s, which is a simple wrapper of `Element`. ```rust diff --git a/src/elements/fixed_width.rs b/src/elements/fixed_width.rs index f47b437..2ab5593 100644 --- a/src/elements/fixed_width.rs +++ b/src/elements/fixed_width.rs @@ -6,7 +6,7 @@ use crate::parsers::{blank_lines, take_lines_while}; #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] pub struct FixedWidth<'a> { - /// Fxied width value + /// Fixed width value pub value: Cow<'a, str>, /// Numbers of blank lines between last fixed width's line and next /// non-blank line or buffer's end diff --git a/src/elements/fn_def.rs b/src/elements/fn_def.rs index a94feaf..568b004 100644 --- a/src/elements/fn_def.rs +++ b/src/elements/fn_def.rs @@ -14,7 +14,7 @@ use crate::parsers::{blank_lines, line}; #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug, Default)] pub struct FnDef<'a> { - /// Footnote label, used for refrence + /// Footnote label, used for reference pub label: Cow<'a, str>, /// Numbers of blank lines between last footnote definition's line and next /// non-blank line or buffer's end diff --git a/src/elements/inline_call.rs b/src/elements/inline_call.rs index 8605e76..b479463 100644 --- a/src/elements/inline_call.rs +++ b/src/elements/inline_call.rs @@ -18,7 +18,7 @@ pub struct InlineCall<'a> { /// Header arguments applied to the code block #[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))] pub inside_header: Option>, - /// Arugment passed to the code block + /// Argument passed to the code block pub arguments: Cow<'a, str>, /// Header arguments applied to the calling instance #[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))] diff --git a/src/elements/keyword.rs b/src/elements/keyword.rs index b3adc3a..1dda8fc 100644 --- a/src/elements/keyword.rs +++ b/src/elements/keyword.rs @@ -11,7 +11,7 @@ use nom::{ use crate::parsers::{blank_lines, line}; -/// Keyword Elemenet +/// Keyword Element #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug)] @@ -38,7 +38,7 @@ impl Keyword<'_> { } } -/// Babel Call Elemenet +/// Babel Call Element #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug)] diff --git a/src/elements/list.rs b/src/elements/list.rs index 771ce2d..2661a1c 100644 --- a/src/elements/list.rs +++ b/src/elements/list.rs @@ -26,7 +26,7 @@ pub struct List { pub post_blank: usize, } -/// List Item Elemenet +/// List Item Element #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug)] diff --git a/src/elements/planning.rs b/src/elements/planning.rs index d2cf4df..fb92f07 100644 --- a/src/elements/planning.rs +++ b/src/elements/planning.rs @@ -2,7 +2,7 @@ use memchr::memchr; use crate::elements::Timestamp; -/// Palnning element +/// Planning element #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug)] diff --git a/src/elements/table.rs b/src/elements/table.rs index cc6b04a..c640072 100644 --- a/src/elements/table.rs +++ b/src/elements/table.rs @@ -4,7 +4,7 @@ use memchr::memchr; use crate::parsers::{blank_lines, take_lines_while}; -/// Table Elemenet +/// Table Element #[derive(Debug)] #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] @@ -81,7 +81,7 @@ impl Table<'_> { } } -/// Table Row Elemenet +/// Table Row Element /// /// # Syntax /// @@ -120,7 +120,7 @@ pub enum TableRow { BodyRule, } -/// Table Cell Elemenet +/// Table Cell Element #[derive(Debug)] #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] diff --git a/src/elements/title.rs b/src/elements/title.rs index af8b0f2..5957fd0 100644 --- a/src/elements/title.rs +++ b/src/elements/title.rs @@ -20,7 +20,7 @@ use crate::{ parsers::{blank_lines, line, skip_empty_lines, take_one_word}, }; -/// Title Elemenet +/// Title Element #[cfg_attr(test, derive(PartialEq))] #[cfg_attr(feature = "ser", derive(serde::Serialize))] #[derive(Debug)] @@ -38,7 +38,7 @@ pub struct Title<'a> { pub keyword: Option>, /// Raw headline's text, without the stars and the tags pub raw: Cow<'a, str>, - /// Planning elemenet associated to this headline + /// Planning element associated to this headline #[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))] pub planning: Option>>, /// Property drawer associated to this headline diff --git a/src/export/html.rs b/src/export/html.rs index 92e7e30..e0b0bd1 100644 --- a/src/export/html.rs +++ b/src/export/html.rs @@ -299,7 +299,7 @@ mod syntect_handler { /// ..Default::default() /// }; /// - /// // Make sure to check if theme presents or it will painc at runtime + /// // Make sure to check if theme presents or it will panic at runtime /// if handler.theme_set.themes.contains_key("dont-exists") { /// /// } diff --git a/src/headline.rs b/src/headline.rs index bcf1ec3..49c3617 100644 --- a/src/headline.rs +++ b/src/headline.rs @@ -359,7 +359,7 @@ pub struct Headline { } impl Headline { - /// Creates a new detaced Headline. + /// Creates a new detached Headline. pub fn new<'a>(ttl: Title<'a>, org: &mut Org<'a>) -> Headline { let lvl = ttl.level; let hdl_n = org.arena.new_node(Element::Headline { level: ttl.level }); @@ -472,7 +472,7 @@ impl Headline { /// Changes the level of this headline. /// /// Returns an error if this headline is attached and the given new level - /// dones't meet the requirements. + /// doesn't meet the requirements. /// /// ```rust /// # use orgize::{elements::Title, Headline, Org}; diff --git a/src/lib.rs b/src/lib.rs index ff77717..07b86e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,7 @@ //! //! # Iter //! -//! [`Org::iter`] function will returns an iteractor of [`Event`]s, which is +//! [`Org::iter`] function will returns an iterator of [`Event`]s, which is //! a simple wrapper of [`Element`]. //! //! [`Org::iter`]: struct.Org.html#method.iter diff --git a/src/org.rs b/src/org.rs index bd3d62f..982ce6e 100644 --- a/src/org.rs +++ b/src/org.rs @@ -54,7 +54,7 @@ impl<'a> Org<'a> { org } - /// Returns a refrence to the underlay arena. + /// Returns a reference to the underlay arena. pub fn arena(&self) -> &Arena> { &self.arena } diff --git a/src/parsers.rs b/src/parsers.rs index 57bcc5b..28c492f 100644 --- a/src/parsers.rs +++ b/src/parsers.rs @@ -101,7 +101,7 @@ impl<'a> ElementArena<'a> for OwnedArena<'a, '_, '_> { pub enum Container<'a> { // Block, List Item Block { content: &'a str, node: NodeId }, - // Pargraph, Inline Markup + // Paragraph, Inline Markup Inline { content: &'a str, node: NodeId }, // Headline Headline { content: &'a str, node: NodeId }, diff --git a/src/validate.rs b/src/validate.rs index 09f4738..1b47bef 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -23,7 +23,7 @@ pub enum ValidationError { ExpectedDetached { at: NodeId, }, - /// Expected headline level in sepcify range + /// Expected headline level in specify range HeadlineLevelMismatch { range: RangeInclusive, at: NodeId,