textlane-core 0.6.0

Textlane's core: unist, mdast, hast and nlcst trees, the file and the plugin contract its crates share
Documentation
//! Textlane's core: the unist conventions and the mdast, hast and nlcst nodes built on them, the
//! file a pipeline reads and reports diagnostics against, and the plugin contract every crate
//! shares.

mod plugin;
mod helpers {
    pub(crate) mod gemoji;
    pub(crate) mod gemoji_table;
    pub(crate) mod slug;
    pub(crate) mod slug_table;
    pub(crate) mod url;
}
mod models {
    pub(crate) mod arena;
    pub(crate) mod data;
    pub(crate) mod error;
    pub(crate) mod file;
    pub(crate) mod hast;
    pub(crate) mod lines;
    pub(crate) mod location;
    pub(crate) mod mdast;
    pub(crate) mod mdx;
    pub(crate) mod nlcst;
    pub(crate) mod position;
    pub(crate) mod smartypants;
    pub(crate) mod tree;
}
#[cfg(feature = "json")]
mod actions {
    pub(crate) mod hast {
        pub(crate) mod deserialize;
        pub(crate) mod serialize;
    }
    pub(crate) mod mdast {
        pub(crate) mod deserialize;
        pub(crate) mod serialize;
    }
    pub(crate) mod mdx {
        pub(crate) mod deserialize;
        pub(crate) mod serialize;
    }
    pub(crate) mod nlcst {
        pub(crate) mod deserialize;
        pub(crate) mod serialize;
    }
    pub(crate) mod position {
        pub(crate) mod deserialize;
        pub(crate) mod serialize;
    }
}

/// The mdast nodes: Markdown's syntax tree.
pub mod mdast {
    #[cfg(feature = "json")]
    pub use crate::actions::mdast::deserialize::deserialize_mdast;
    #[cfg(feature = "json")]
    pub use crate::actions::mdast::serialize::serialize_mdast;
    pub use crate::models::mdast::*;
    pub use crate::models::mdx::*;
}

/// The hast nodes: HTML's syntax tree.
pub mod hast {
    #[cfg(feature = "json")]
    pub use crate::actions::hast::deserialize::deserialize_hast;
    #[cfg(feature = "json")]
    pub use crate::actions::hast::serialize::serialize_hast;
    pub use crate::models::hast::*;
    pub use crate::models::mdx::*;
}

/// The nlcst nodes: natural language's syntax tree.
pub mod nlcst {
    #[cfg(feature = "json")]
    pub use crate::actions::nlcst::deserialize::deserialize_nlcst;
    #[cfg(feature = "json")]
    pub use crate::actions::nlcst::serialize::serialize_nlcst;
    pub use crate::models::nlcst::*;
}

// helpers
pub use helpers::gemoji::{find_gemoji_shortcodes, read_gemoji_label};
pub use helpers::slug::{Slugger, create_slug};
pub use helpers::url::{ResolvedUrl, prefix_base, resolve_url};

// models
pub use models::arena::ArenaVec;
pub use models::data::Data;
pub use models::error::Error;
pub use models::file::{File, Message};
pub use models::lines::Lines;
pub use models::location::Location;
pub use models::position::{Point, Position, UnistPoint, UnistPosition};
pub use models::smartypants::{
    Backticks, Dashes, Ellipses, QuoteCharacters, Typography, read_switch,
};
pub use models::tree::{Tree, TreeKind};
pub use plugin::{
    Attach, Compiler, HtmlTarget, HtmlWriter, Job, NaturalLanguageParser,
    NaturalLanguageParserSlot, Parser, Plugin, ScriptError, ScriptExpression,
    ScriptParser, ScriptParserSlot, ScriptStatement, Slots, Step, Transform, Typographer,
    TypographerSlot,
};

/// The arena every node of one document is allocated in.
pub use bumpalo::Bump as Allocator;
/// A string allocated in a document's arena, while it is being built.
pub type ArenaString<'a> = bumpalo::collections::String<'a>;