pub struct ToMarkdown {
pub document: bool,
pub newlines: bool,
pub checked: Option<String>,
pub unchecked: Option<String>,
pub quotes: Option<Vec<String>>,
pub math: bool,
pub code_meta: BTreeMap<String, String>,
}Expand description
html.toMarkdown: hast into mdast; options named as hast-util-to-mdast names them.
Fields§
§document: boolWrap all phrasing content of the root in paragraphs, as for a whole document.
newlines: boolCollapse whitespace holding a line ending to that line ending instead of a space.
checked: Option<String>The text of a checked checkbox or radio, [x] by default.
unchecked: Option<String>The text of an unchecked checkbox or radio, [ ] by default.
quotes: Option<Vec<String>>The quotes <q> uses, an opening and closing character each, alternating by how
deep it nests; " by default.
math: boolTurn MathML <math> holding a TeX annotation, as html.katex writes it, into math
nodes, $…$ once md.math writes them, display math for display="block", and
drop KaTeX’s visual katex-html copy.
code_meta: BTreeMap<String, String>Attributes of a code block’s <pre> or <code> written into its meta, each to the
key it takes there: {"data-title": "title"} makes title="a.js".
Trait Implementations§
Source§impl Clone for ToMarkdown
impl Clone for ToMarkdown
Source§impl Debug for ToMarkdown
impl Debug for ToMarkdown
Source§impl Default for ToMarkdown
impl Default for ToMarkdown
Source§impl<'de> Deserialize<'de> for ToMarkdownwhere
ToMarkdown: Default,
impl<'de> Deserialize<'de> for ToMarkdownwhere
ToMarkdown: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Transform for ToMarkdown
impl Transform for ToMarkdown
fn input(&self) -> TreeKind
fn output(&self) -> TreeKind
fn run<'a>( &self, tree: Tree<'a>, _file: &mut File, alloc: &'a Allocator, ) -> Result<Tree<'a>, Error>
Source§fn start<'a>(
&self,
tree: Tree<'a>,
file: &mut File,
alloc: &'a Bump,
) -> Result<Step<'a>, Error>
fn start<'a>( &self, tree: Tree<'a>, file: &mut File, alloc: &'a Bump, ) -> Result<Step<'a>, Error>
Source§fn host(&self) -> Option<u32>
fn host(&self) -> Option<u32>
None for a stage the crate runs.Source§fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
target would write from its output, when the stage can skip building that tree.