docs: fix some broken links
This commit is contained in:
parent
2b8d2590ff
commit
fffadac04d
|
@ -9,7 +9,7 @@ use crate::export::write_datetime;
|
||||||
/// A wrapper for escaping sensitive characters in html.
|
/// A wrapper for escaping sensitive characters in html.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use orgize::export::html::Escape;
|
/// use orgize::export::HtmlEscape as Escape;
|
||||||
///
|
///
|
||||||
/// assert_eq!(format!("{}", Escape("< < <")), "< < <");
|
/// assert_eq!(format!("{}", Escape("< < <")), "< < <");
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
//! Export `Org` struct to various formats.
|
//! Export `Org` struct to various formats.
|
||||||
|
|
||||||
pub mod html;
|
mod html;
|
||||||
pub mod org;
|
mod org;
|
||||||
|
|
||||||
pub use html::{DefaultHtmlHandler, Escape as HtmlEscape, HtmlHandler};
|
pub use html::{DefaultHtmlHandler, Escape as HtmlEscape, HtmlHandler};
|
||||||
|
#[cfg(feature = "syntect")]
|
||||||
|
pub use html::SyntectHtmlHandler;
|
||||||
pub use org::{DefaultOrgHandler, OrgHandler};
|
pub use org::{DefaultOrgHandler, OrgHandler};
|
||||||
|
|
||||||
use std::io::{Error, Write};
|
use std::io::{Error, Write};
|
||||||
|
|
24
src/lib.rs
24
src/lib.rs
|
@ -6,7 +6,7 @@
|
||||||
//!
|
//!
|
||||||
//! To parse a orgmode string, simply invoking the [`Org::parse`] function:
|
//! To parse a orgmode string, simply invoking the [`Org::parse`] function:
|
||||||
//!
|
//!
|
||||||
//! [`Org::parse`]: org/struct.Org.html#method.parse
|
//! [`Org::parse`]: struct.Org.html#method.parse
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use orgize::Org;
|
//! use orgize::Org;
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
//!
|
//!
|
||||||
//! or [`Org::parse_with_config`]:
|
//! or [`Org::parse_with_config`]:
|
||||||
//!
|
//!
|
||||||
//! [`Org::parse_with_config`]: org/struct.Org.html#method.parse_with_config
|
//! [`Org::parse_with_config`]: struct.Org.html#method.parse_with_config
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use orgize::{Org, ParseConfig};
|
//! use orgize::{Org, ParseConfig};
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
//! [`Org::iter`] function will returns an iteractor of [`Event`]s, which is
|
//! [`Org::iter`] function will returns an iteractor of [`Event`]s, which is
|
||||||
//! a simple wrapper of [`Element`].
|
//! a simple wrapper of [`Element`].
|
||||||
//!
|
//!
|
||||||
//! [`Org::iter`]: org/struct.Org.html#method.iter
|
//! [`Org::iter`]: struct.Org.html#method.iter
|
||||||
//! [`Event`]: iter/enum.Event.html
|
//! [`Event`]: enum.Event.html
|
||||||
//! [`Element`]: elements/enum.Element.html
|
//! [`Element`]: elements/enum.Element.html
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
|
@ -51,16 +51,16 @@
|
||||||
//! **Note**: whether an element is container or not, it will appears twice in one loop.
|
//! **Note**: whether an element is container or not, it will appears twice in one loop.
|
||||||
//! One as [`Event::Start(element)`], one as [`Event::End(element)`].
|
//! One as [`Event::Start(element)`], one as [`Event::End(element)`].
|
||||||
//!
|
//!
|
||||||
//! [`Event::Start(element)`]: iter/enum.Event.html#variant.Start
|
//! [`Event::Start(element)`]: enum.Event.html#variant.Start
|
||||||
//! [`Event::End(element)`]: iter/enum.Event.html#variant.End
|
//! [`Event::End(element)`]: enum.Event.html#variant.End
|
||||||
//!
|
//!
|
||||||
//! # Render html
|
//! # Render html
|
||||||
//!
|
//!
|
||||||
//! You can call the [`Org::html`] function to generate html directly, which
|
//! You can call the [`Org::html`] function to generate html directly, which
|
||||||
//! uses the [`DefaultHtmlHandler`] internally:
|
//! uses the [`DefaultHtmlHandler`] internally:
|
||||||
//!
|
//!
|
||||||
//! [`Org::html`]: org/struct.Org.html#method.html
|
//! [`Org::html`]: struct.Org.html#method.html
|
||||||
//! [`DefaultHtmlHandler`]: export/html/struct.DefaultHtmlHandler.html
|
//! [`DefaultHtmlHandler`]: export/struct.DefaultHtmlHandler.html
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use orgize::Org;
|
//! use orgize::Org;
|
||||||
|
@ -79,8 +79,8 @@
|
||||||
//! To customize html rendering, simply implementing [`HtmlHandler`] trait and passing
|
//! To customize html rendering, simply implementing [`HtmlHandler`] trait and passing
|
||||||
//! it to the [`Org::html_with_handler`] function.
|
//! it to the [`Org::html_with_handler`] function.
|
||||||
//!
|
//!
|
||||||
//! [`HtmlHandler`]: export/html/trait.HtmlHandler.html
|
//! [`HtmlHandler`]: export/trait.HtmlHandler.html
|
||||||
//! [`Org::html_with_handler`]: org/struct.Org.html#method.html_with_handler
|
//! [`Org::html_with_handler`]: struct.Org.html#method.html_with_handler
|
||||||
//!
|
//!
|
||||||
//! The following code demonstrates how to add a id for every headline and return
|
//! The following code demonstrates how to add a id for every headline and return
|
||||||
//! own error type while rendering.
|
//! own error type while rendering.
|
||||||
|
@ -212,7 +212,9 @@
|
||||||
//!
|
//!
|
||||||
//! + `chrono`: adds the ability to convert `Datetime` into `chrono` structs, disabled by default.
|
//! + `chrono`: adds the ability to convert `Datetime` into `chrono` structs, disabled by default.
|
||||||
//!
|
//!
|
||||||
//! + `syntect`: provides `SyntectHtmlHandler` for highlighting code block, disabled by default.
|
//! + `syntect`: provides [`SyntectHtmlHandler`] for highlighting code block, disabled by default.
|
||||||
|
//!
|
||||||
|
//! [`SyntectHtmlHandler`]: export/struct.SyntectHtmlHandler.html
|
||||||
//!
|
//!
|
||||||
//! # License
|
//! # License
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Reference in a new issue