docs: fix a few misspelled words (#5)
This commit is contained in:
parent
56e6111ae7
commit
37e27b3461
|
@ -35,7 +35,7 @@ Org::parse_custom(
|
||||||
|
|
||||||
## Iter
|
## 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`.
|
a simple wrapper of `Element`.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
|
|
@ -6,7 +6,7 @@ use crate::parsers::{blank_lines, take_lines_while};
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
pub struct FixedWidth<'a> {
|
pub struct FixedWidth<'a> {
|
||||||
/// Fxied width value
|
/// Fixed width value
|
||||||
pub value: Cow<'a, str>,
|
pub value: Cow<'a, str>,
|
||||||
/// Numbers of blank lines between last fixed width's line and next
|
/// Numbers of blank lines between last fixed width's line and next
|
||||||
/// non-blank line or buffer's end
|
/// non-blank line or buffer's end
|
||||||
|
|
|
@ -14,7 +14,7 @@ use crate::parsers::{blank_lines, line};
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct FnDef<'a> {
|
pub struct FnDef<'a> {
|
||||||
/// Footnote label, used for refrence
|
/// Footnote label, used for reference
|
||||||
pub label: Cow<'a, str>,
|
pub label: Cow<'a, str>,
|
||||||
/// Numbers of blank lines between last footnote definition's line and next
|
/// Numbers of blank lines between last footnote definition's line and next
|
||||||
/// non-blank line or buffer's end
|
/// non-blank line or buffer's end
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub struct InlineCall<'a> {
|
||||||
/// Header arguments applied to the code block
|
/// Header arguments applied to the code block
|
||||||
#[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))]
|
#[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))]
|
||||||
pub inside_header: Option<Cow<'a, str>>,
|
pub inside_header: Option<Cow<'a, str>>,
|
||||||
/// Arugment passed to the code block
|
/// Argument passed to the code block
|
||||||
pub arguments: Cow<'a, str>,
|
pub arguments: Cow<'a, str>,
|
||||||
/// Header arguments applied to the calling instance
|
/// Header arguments applied to the calling instance
|
||||||
#[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))]
|
#[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))]
|
||||||
|
|
|
@ -11,7 +11,7 @@ use nom::{
|
||||||
|
|
||||||
use crate::parsers::{blank_lines, line};
|
use crate::parsers::{blank_lines, line};
|
||||||
|
|
||||||
/// Keyword Elemenet
|
/// Keyword Element
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -38,7 +38,7 @@ impl Keyword<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Babel Call Elemenet
|
/// Babel Call Element
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub struct List {
|
||||||
pub post_blank: usize,
|
pub post_blank: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List Item Elemenet
|
/// List Item Element
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -2,7 +2,7 @@ use memchr::memchr;
|
||||||
|
|
||||||
use crate::elements::Timestamp;
|
use crate::elements::Timestamp;
|
||||||
|
|
||||||
/// Palnning element
|
/// Planning element
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -4,7 +4,7 @@ use memchr::memchr;
|
||||||
|
|
||||||
use crate::parsers::{blank_lines, take_lines_while};
|
use crate::parsers::{blank_lines, take_lines_while};
|
||||||
|
|
||||||
/// Table Elemenet
|
/// Table Element
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
|
@ -81,7 +81,7 @@ impl Table<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Table Row Elemenet
|
/// Table Row Element
|
||||||
///
|
///
|
||||||
/// # Syntax
|
/// # Syntax
|
||||||
///
|
///
|
||||||
|
@ -120,7 +120,7 @@ pub enum TableRow {
|
||||||
BodyRule,
|
BodyRule,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Table Cell Elemenet
|
/// Table Cell Element
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
|
|
|
@ -20,7 +20,7 @@ use crate::{
|
||||||
parsers::{blank_lines, line, skip_empty_lines, take_one_word},
|
parsers::{blank_lines, line, skip_empty_lines, take_one_word},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Title Elemenet
|
/// Title Element
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
#[cfg_attr(test, derive(PartialEq))]
|
||||||
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
#[cfg_attr(feature = "ser", derive(serde::Serialize))]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -38,7 +38,7 @@ pub struct Title<'a> {
|
||||||
pub keyword: Option<Cow<'a, str>>,
|
pub keyword: Option<Cow<'a, str>>,
|
||||||
/// Raw headline's text, without the stars and the tags
|
/// Raw headline's text, without the stars and the tags
|
||||||
pub raw: Cow<'a, str>,
|
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"))]
|
#[cfg_attr(feature = "ser", serde(skip_serializing_if = "Option::is_none"))]
|
||||||
pub planning: Option<Box<Planning<'a>>>,
|
pub planning: Option<Box<Planning<'a>>>,
|
||||||
/// Property drawer associated to this headline
|
/// Property drawer associated to this headline
|
||||||
|
|
|
@ -299,7 +299,7 @@ mod syntect_handler {
|
||||||
/// ..Default::default()
|
/// ..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") {
|
/// if handler.theme_set.themes.contains_key("dont-exists") {
|
||||||
///
|
///
|
||||||
/// }
|
/// }
|
||||||
|
|
|
@ -359,7 +359,7 @@ pub struct Headline {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl 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 {
|
pub fn new<'a>(ttl: Title<'a>, org: &mut Org<'a>) -> Headline {
|
||||||
let lvl = ttl.level;
|
let lvl = ttl.level;
|
||||||
let hdl_n = org.arena.new_node(Element::Headline { level: 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.
|
/// Changes the level of this headline.
|
||||||
///
|
///
|
||||||
/// Returns an error if this headline is attached and the given new level
|
/// Returns an error if this headline is attached and the given new level
|
||||||
/// dones't meet the requirements.
|
/// doesn't meet the requirements.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use orgize::{elements::Title, Headline, Org};
|
/// # use orgize::{elements::Title, Headline, Org};
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
//!
|
//!
|
||||||
//! # Iter
|
//! # 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`].
|
//! a simple wrapper of [`Element`].
|
||||||
//!
|
//!
|
||||||
//! [`Org::iter`]: struct.Org.html#method.iter
|
//! [`Org::iter`]: struct.Org.html#method.iter
|
||||||
|
|
|
@ -54,7 +54,7 @@ impl<'a> Org<'a> {
|
||||||
org
|
org
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a refrence to the underlay arena.
|
/// Returns a reference to the underlay arena.
|
||||||
pub fn arena(&self) -> &Arena<Element<'a>> {
|
pub fn arena(&self) -> &Arena<Element<'a>> {
|
||||||
&self.arena
|
&self.arena
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ impl<'a> ElementArena<'a> for OwnedArena<'a, '_, '_> {
|
||||||
pub enum Container<'a> {
|
pub enum Container<'a> {
|
||||||
// Block, List Item
|
// Block, List Item
|
||||||
Block { content: &'a str, node: NodeId },
|
Block { content: &'a str, node: NodeId },
|
||||||
// Pargraph, Inline Markup
|
// Paragraph, Inline Markup
|
||||||
Inline { content: &'a str, node: NodeId },
|
Inline { content: &'a str, node: NodeId },
|
||||||
// Headline
|
// Headline
|
||||||
Headline { content: &'a str, node: NodeId },
|
Headline { content: &'a str, node: NodeId },
|
||||||
|
|
|
@ -23,7 +23,7 @@ pub enum ValidationError {
|
||||||
ExpectedDetached {
|
ExpectedDetached {
|
||||||
at: NodeId,
|
at: NodeId,
|
||||||
},
|
},
|
||||||
/// Expected headline level in sepcify range
|
/// Expected headline level in specify range
|
||||||
HeadlineLevelMismatch {
|
HeadlineLevelMismatch {
|
||||||
range: RangeInclusive<usize>,
|
range: RangeInclusive<usize>,
|
||||||
at: NodeId,
|
at: NodeId,
|
||||||
|
|
Loading…
Reference in a new issue