file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
mdast_util_to_markdown/src/util/contains_control_or_whitespace.rs
Rust
pub fn contains_control_or_whitespace(value: &str) -> bool { value.chars().any(|c| c.is_whitespace() || c.is_control()) }
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/format_code_as_indented.rs
Rust
//! JS equivalent https://github.com/syntax-tree/mdast-util-to-markdown/blob/main/lib/util/format-code-as-indented.js use crate::state::State; use markdown::mdast::Code; use regex::Regex; pub fn format_code_as_indented(code: &Code, state: &State) -> bool { let non_whitespace = code.value.chars().any(|c| !c.is_whi...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/format_heading_as_setext.rs
Rust
//! JS equivalent https://github.com/syntax-tree/mdast-util-to-markdown/blob/main/lib/util/format-heading-as-setext.js use alloc::string::{String, ToString}; use markdown::mdast::{Heading, Node}; use regex::Regex; use crate::state::State; pub fn format_heading_as_setext(heading: &Heading, state: &State) -> bool { ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/format_link_as_auto_link.rs
Rust
//! JS equivalent https://github.com/syntax-tree/mdast-util-to-markdown/blob/main/lib/util/format-link-as-autolink.js use crate::state::State; use alloc::{format, string::ToString}; use markdown::mdast::{Link, Node}; use regex::RegexBuilder; pub fn format_link_as_auto_link(link: &Link, node: &Node, state: &State) -> ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/longest_char_streak.rs
Rust
//! JS equivalent https://github.com/wooorm/longest-streak/blob/main/index.js pub fn longest_char_streak(haystack: &str, needle: char) -> usize { let mut max = 0; let mut chars = haystack.chars(); while let Some(char) = chars.next() { if char == needle { let mut count = 1; ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/mod.rs
Rust
pub mod check_bullet; pub mod check_bullet_ordered; pub mod check_bullet_other; pub mod check_emphasis; pub mod check_fence; pub mod check_quote; pub mod check_rule; pub mod check_rule_repetition; pub mod check_strong; pub mod contains_control_or_whitespace; pub mod format_code_as_indented; pub mod format_heading_as_se...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/pattern_in_scope.rs
Rust
//! JS equivalent https://github.com/syntax-tree/mdast-util-to-markdown/blob/main/lib/util/pattern-in-scope.js use crate::{construct_name::ConstructName, r#unsafe::Unsafe}; /// JS: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/fd6a508/lib/util/pattern-in-scope.js#L24>. fn list_in_scope(stack: &[Construc...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/src/util/safe.rs
Rust
//! JS equivalent https://github.com/syntax-tree/mdast-util-to-markdown/blob/fd6a508/lib/util/safe.js use alloc::{format, string::String, vec::Vec}; use regex::Regex; pub struct EscapeInfos { pub after: bool, pub before: bool, } pub struct SafeConfig<'a> { pub after: &'a str, pub before: &'a str, ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/blockquote.rs
Rust
use markdown::mdast::{ Blockquote, Break, Code, Definition, Emphasis, Heading, Html, Image, ImageReference, InlineCode, Link, LinkReference, List, ListItem, Node, Paragraph, ReferenceKind, Strong, Text, ThematicBreak, }; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/break.rs
Rust
use markdown::{ mdast::{Break, Heading, Node, Text}, to_mdast as from, }; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn r#break() { assert_eq!( to(&Node::Break(Break { position: None })).unw...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/code.rs
Rust
use markdown::mdast::{Code, Node}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn text() { assert_eq!( to_md_with_opts( &Node::Code(Code { value: String::from("a"), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/core.rs
Rust
use markdown::mdast::{ Break, Code, Definition, Heading, List, ListItem, Node, Paragraph, Root, Text, ThematicBreak, }; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn core() { assert_eq!( to(&Nod...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/definition.rs
Rust
use markdown::mdast::{Definition, Node}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn defintion() { assert_eq!( to(&Node::Definition(Definition { url: String::new(), title: ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/emphasis.rs
Rust
use markdown::mdast::{Emphasis, Node, Paragraph, Text}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn emphasis() { assert_eq!( to(&Node::Emphasis(Emphasis { children: Vec::new(), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/heading.rs
Rust
use markdown::mdast::{Break, Heading, Html, Node, Text}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn heading() { assert_eq!( to(&Node::Heading(Heading { children: vec![], p...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/html.rs
Rust
use markdown::mdast::{Html, Node, Paragraph, Text}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn html() { assert_eq!( to(&Node::Html(Html { value: String::new(), position: None })) .unwrap(), "", "should ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/image.rs
Rust
use markdown::mdast::{Image, Node}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn image() { assert_eq!( to(&Node::Image(Image { position: None, alt: String::new(), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/image_reference.rs
Rust
use markdown::mdast::{ImageReference, Node, Paragraph, ReferenceKind}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn image_reference() { assert_eq!( to(&Node::ImageReference(ImageReference { position: None, alt: String::new(), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/inline_code.rs
Rust
use markdown::mdast::{InlineCode, Node}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn text() { assert_eq!( to(&Node::InlineCode(InlineCode { value: String::new(), position: None })) .unwrap(), "``\n", "sh...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/link.rs
Rust
use markdown::mdast::{Link, Node, Text}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn text() { assert_eq!( to(&Node::Link(Link { children: Vec::new(), position: None, ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/link_reference.rs
Rust
use markdown::mdast::{LinkReference, Node, Paragraph, ReferenceKind, Text}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn link_reference() { assert_eq!( to(&Node::LinkReference(LinkReference { children: Vec::new(), position: None, ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/list.rs
Rust
use markdown::mdast::{List, ListItem, Node, Paragraph, Text, ThematicBreak}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, IndentOptions, Options, }; use pretty_assertions::assert_eq; #[test] fn list() { assert_eq!( to(&Node::List(List { child...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/list_item.rs
Rust
use markdown::mdast::{List, ListItem, Node, Paragraph, Root, Text, ThematicBreak}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, IndentOptions, Options, }; use pretty_assertions::assert_eq; #[test] fn list_item() { assert_eq!( to(&Node::ListItem(ListItem ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/math.rs
Rust
use markdown::mdast::{Definition, InlineMath, Math, Node, Paragraph, Text}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn math() { assert_eq!( to(&Node::InlineMath(InlineMath { value: St...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/paragraph.rs
Rust
use markdown::mdast::{Node, Paragraph, Text}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn paragraph() { assert_eq!( to(&Node::Paragraph(Paragraph { children: vec![], position: None })) .unwrap(), "", "sh...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/roundtrip.rs
Rust
use markdown::{mdast::Node, to_mdast as from}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn roundtrip() { let doc: String = document(vec![ "> * Lorem ipsum dolor sit amet", ">", "> ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/strong.rs
Rust
use markdown::mdast::{Node, Strong, Text}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn strong() { assert_eq!( to(&Node::Strong(Strong { children: Vec::new(), position: None...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/text.rs
Rust
use markdown::mdast::{Node, Text}; use mdast_util_to_markdown::to_markdown as to; use pretty_assertions::assert_eq; #[test] fn text() { assert_eq!( to(&Node::Text(Text { value: String::new(), position: None, })) .unwrap(), "", "should support an empty...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
mdast_util_to_markdown/tests/thematic_break.rs
Rust
use markdown::mdast::{Node, ThematicBreak}; use mdast_util_to_markdown::{ to_markdown as to, to_markdown_with_options as to_md_with_opts, Options, }; use pretty_assertions::assert_eq; #[test] fn thematic_break() { assert_eq!( to(&Node::ThematicBreak(ThematicBreak { position: None })).unwrap(), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/configuration.rs
Rust
use crate::util::{ line_ending::LineEnding, mdx::{EsmParse as MdxEsmParse, ExpressionParse as MdxExpressionParse}, }; use alloc::{boxed::Box, fmt, string::String}; /// Control which constructs are enabled. /// /// Not all constructs can be configured. /// Notably, blank lines and paragraphs cannot be turned of...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/attention.rs
Rust
//! Attention (emphasis, strong, optionally GFM strikethrough) occurs in the //! [text][] content type. //! //! ## Grammar //! //! Attention sequences form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! attention_sequence ::= 1*'*' | 1*'_' //! gfm_...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/autolink.rs
Rust
//! Autolink occurs in the [text][] content type. //! //! ## Grammar //! //! Autolink forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! autolink ::= '<' (url | email) '>' //! //! url ::= protocol *url_byte //! protocol ::= ascii_alphabetic 0*31(...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/blank_line.rs
Rust
//! Blank lines occur in the [flow][] content type. //! //! ## Grammar //! //! Blank lines form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! blank_line ::= *space_or_tab //! ``` //! //! As this construct occurs in flow, like all flow constructs, ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/block_quote.rs
Rust
//! Block quotes occur in the [document][] content type. //! //! ## Grammar //! //! Block quotes form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! block_quote_start ::= '>' [ space_or_tab ] //! block_quote_cont ::= '>' [ space_or_tab ] //! ``` //...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/character_escape.rs
Rust
//! Character escapes occur in the [string][] and [text][] content types. //! //! ## Grammar //! //! Character escapes form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! character_escape ::= '\\' ascii_punctuation //! ``` //! //! Like much of mark...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/character_reference.rs
Rust
//! Character references occur in the [string][] and [text][] content types. //! //! ## Grammar //! //! Character references form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! character_reference ::= '&' (numeric | named) ';' //! //! numeric ::= '...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/code_indented.rs
Rust
//! Code (indented) occurs in the [flow][] content type. //! //! ## Grammar //! //! Code (indented) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! code_indented ::= filled_line *( eol *( blank_line eol ) filled_line ) //! //! ; Restriction: a...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/content.rs
Rust
//! Content occurs in the [flow][] content type. //! //! Content contains zero or more [definition][definition]s, followed by zero //! or one [paragraph][]. //! //! The constructs found in flow are: //! //! * [Definition][crate::construct::definition] //! * [Paragraph][crate::construct::paragraph] //! //! ## Tokens //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/definition.rs
Rust
//! Definition occurs in the [content] content type. //! //! ## Grammar //! //! Definition forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! definition ::= label ':' [ space_or_tab_eol ] destination [ space_or_tab_eol title ] [ space_or_tab ] //...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/document.rs
Rust
//! The document content type. //! //! **Document** represents the containers, such as block quotes, list items, //! or GFM footnotes, which structure the document and contain other sections. //! //! The constructs found in flow are: //! //! * [Block quote][crate::construct::block_quote] //! * [List item][crate::constr...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/flow.rs
Rust
//! The flow content type. //! //! **Flow** represents the sections, such as headings and code, which are //! parsed per line. //! An example is HTML, which has a certain starting condition (such as //! `<script>` on its own line), then continues for a while, until an end //! condition is found (such as `</style>`). //...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/frontmatter.rs
Rust
//! Frontmatter occurs at the start of the document. //! //! ## Grammar //! //! Frontmatter forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! frontmatter ::= fence_open *( eol *byte ) eol fence_close //! fence_open ::= sequence *space_or_tab //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/gfm_autolink_literal.rs
Rust
//! GFM: autolink literal occurs in the [text][] content type. //! //! ## Grammar //! //! Autolink literals form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! gfm_autolink_literal ::= gfm_protocol_autolink | gfm_www_autolink | gfm_email_autolink /...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/gfm_footnote_definition.rs
Rust
//! GFM: Footnote definition occurs in the [document][] content type. //! //! ## Grammar //! //! Footnote definitions form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: `label` must start with `^` (and not be empty after it). //! ; ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/gfm_label_start_footnote.rs
Rust
//! Label start (footnote) occurs in the [text][] content type. //! //! ## Grammar //! //! Label start (footnote) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! gfm_label_start_footnote ::= '[' '^' //! ``` //! //! ## HTML //! //! Label start ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/gfm_table.rs
Rust
//! GFM: table occurs in the [flow][] content type. //! //! ## Grammar //! //! Tables form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! gfm_table ::= gfm_table_head 0*(eol gfm_table_body_row) //! //! ; Restriction: both rows must have the same nu...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/gfm_task_list_item_check.rs
Rust
//! GFM: Task list item check occurs in the [text][] content type. //! //! ## Grammar //! //! Checks form with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! gfm_task_list_item_check ::= '[' (0x09 | ' ' | 'X' | 'x') ']' //! ``` //! //! The check is only...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/hard_break_escape.rs
Rust
//! Hard break (escape) occurs in the [text][] content type. //! //! ## Grammar //! //! Hard break (escape) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: followed by a line ending (that is part of the content //! ; instead o...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/heading_atx.rs
Rust
//! Heading (atx) occurs in the [flow][] content type. //! //! ## Grammar //! //! Heading (atx) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! heading_atx ::= 1*6'#' [ 1*space_or_tab line [ 1*space_or_tab 1*'#' ] ] *space_or_tab //! ``` //! /...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/heading_setext.rs
Rust
//! Heading (setext) occurs in the [flow][] content type. //! //! ## Grammar //! //! Heading (setext) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! heading_setext ::= paragraph eol *space_or_tab (1*'-' | 1*'=') *space_or_tab //! //! ; See th...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/html_flow.rs
Rust
//! HTML (flow) occurs in the [flow][] content type. //! //! ## Grammar //! //! HTML (flow) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! html_flow ::= raw | comment | instruction | declaration | cdata | basic | complete //! //! ; Note: clos...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/html_text.rs
Rust
//! HTML (text) occurs in the [text][] content type. //! //! ## Grammar //! //! HTML (text) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! html_text ::= comment | instruction | declaration | cdata | tag_close | tag_open //! //! ; Restriction:...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/label_end.rs
Rust
//! Label end occurs in the [text][] content type. //! //! ## Grammar //! //! Label end forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! label_end ::= ']' [resource | reference_full | reference_collapsed] //! //! resource ::= '(' [space_or_tab_...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/label_start_image.rs
Rust
//! Label start (image) occurs in the [text][] content type. //! //! ## Grammar //! //! Label start (image) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! label_start_image ::= '!' '[' //! ``` //! //! ## HTML //! //! Label start (image) does ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/label_start_link.rs
Rust
//! Label start (link) occurs in the [text][] content type. //! //! ## Grammar //! //! Label start (link) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! label_start_link ::= '[' //! ``` //! //! ## HTML //! //! Label start (link) does not, on ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/list_item.rs
Rust
//! List item occurs in the [document][] content type. //! //! ## Grammar //! //! List item forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: if there is no space after the marker, the start must be followed by an `eol`. //! ; Res...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mdx_esm.rs
Rust
//! MDX ESM occurs in the [flow][] content type. //! //! ## Grammar //! //! MDX expression (flow) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_esm ::= word *line *(eol *line) //! //! word ::= 'e' 'x' 'p' 'o' 'r' 't' | 'i' 'm' 'p' 'o' 'r...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mdx_expression_flow.rs
Rust
//! MDX expression (flow) occurs in the [flow][] content type. //! //! ## Grammar //! //! MDX expression (flow) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_expression_flow ::= mdx_expression *space_or_tab //! //! ; See the `partial_mdx...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mdx_expression_text.rs
Rust
//! MDX expression (text) occurs in the [text][] content type. //! //! ## Grammar //! //! MDX expression (text) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_expression_text ::= mdx_expression //! //! ; See the `partial_mdx_expression` c...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mdx_jsx_flow.rs
Rust
//! MDX JSX (flow) occurs in the [flow][] content type. //! //! ## Grammar //! //! MDX JSX (flow) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_jsx_flow ::= mdx_jsx *space_or_tab [mdx_jsx *space_or_tab] //! //! ; See the `partial_mdx_jsx...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mdx_jsx_text.rs
Rust
//! MDX JSX (text) occurs in the [text][] content type. //! //! ## Grammar //! //! MDX JSX (text) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_jsx_text ::= mdx_jsx //! //! ; See the `partial_mdx_jsx` construct for the BNF of that part. ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/mod.rs
Rust
//! Constructs found in markdown. //! //! Constructs are grouped by content type. //! Which content type is allowed somewhere, prescribes which constructs are //! allowed there. //! //! ## Content type //! //! The following content types are found in markdown: //! //! * [document][] //! * [flow][] //! * [string][] //! ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/paragraph.rs
Rust
//! Paragraph occurs in the [content][] content type. //! //! ## Grammar //! //! Paragraph forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: lines cannot start other flow constructs. //! ; Restriction: lines cannot be blank. //! p...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_bom.rs
Rust
//! Byte order mark occurs at the start of the document. //! //! ## Grammar //! //! Byte order mark forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! byte_order_mark ::= 0xEF 0xBB 0xBF //! ``` //! //! ## Recommendation //! //! Don’t use BOMs. //...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_data.rs
Rust
//! Data occurs in the [string][] and [text][] content types. //! //! It can include anything (except for line endings) and stops at certain //! characters. //! //! [string]: crate::construct::string //! [text]: crate::construct::text use crate::event::{Kind, Name}; use crate::state::{Name as StateName, State}; use cr...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_destination.rs
Rust
//! Destination occurs in [definition][] and [label end][label_end]. //! //! ## Grammar //! //! Destination forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! destination ::= destination_enclosed | destination_raw //! //! destination_enclosed ::=...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_label.rs
Rust
//! Label occurs in [definition][] and [label end][label_end]. //! //! ## Grammar //! //! Label forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: maximum `999` codes allowed between brackets. //! ; Restriction: no blank lines. //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_mdx_expression.rs
Rust
//! MDX expression occurs in [MDX expression (flow)][mdx_expression_flow] and //! [MDX expression (text)][mdx_expression_text]. //! //! ## Grammar //! //! MDX expression forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! mdx_expression ::= '{' *(...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_mdx_jsx.rs
Rust
//! MDX JSX occurs in [MDX JSX (flow)][mdx_jsx_flow] and //! [MDX JSX (text)][mdx_jsx_text]. //! //! ## Grammar //! //! MDX JSX forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; constraint: markdown whitespace (`space_or_tab | eol`) is NOT //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_non_lazy_continuation.rs
Rust
//! Non-lazy continuation. //! //! This is a tiny helper that [flow][] constructs can use to make sure that //! the following line is not lazy. //! For example, [html (flow)][html_flow] and ([raw (flow)][raw_flow], //! [indented][code_indented]), stop when the next line is lazy. //! //! [flow]: crate::construct::flow /...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_space_or_tab.rs
Rust
//! Space or tab occurs in tons of places. //! //! ## Grammar //! //! Space or tab forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! space_or_tab ::= 1*('\t' | ' ') //! ``` //! //! ## References //! //! * [`micromark-factory-space/index.js` in `...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_space_or_tab_eol.rs
Rust
//! Space or tab (eol) occurs in [destination][], [label][], and [title][]. //! //! ## Grammar //! //! Space or tab (eol) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! space_or_tab_eol ::= 1*space_or_tab | *space_or_tab eol *space_or_tab //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_title.rs
Rust
//! Title occurs in [definition][] and [label end][label_end]. //! //! ## Grammar //! //! Title forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: no blank lines. //! ; Restriction: markers must match (in case of `(` with `)`). //!...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/partial_whitespace.rs
Rust
//! Trailing whitespace occurs in [string][] and [text][]. //! //! ## Grammar //! //! Trailing whitespace forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: the start and end here count as an eol in the case of `text`. //! whitespa...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/raw_flow.rs
Rust
//! Raw (flow) occurs in the [flow][] content type. //! It forms code (fenced) and math (flow). //! //! ## Grammar //! //! Code (fenced) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! raw_flow ::= fence_open *( eol *byte ) [ eol fence_close ]...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/raw_text.rs
Rust
//! Raw (text) occurs in the [text][] content type. //! It forms code (text) and math (text). //! //! ## Grammar //! //! Raw (text) forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: the number of markers in the closing sequence mu...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/string.rs
Rust
//! The string content type. //! //! **String** is a limited [text][] like content type which only allows //! character escapes and character references. //! It exists in things such as identifiers (media references, definitions), //! titles, URLs, code (fenced) info and meta parts. //! //! The constructs found in stri...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/text.rs
Rust
//! The text content type. //! //! **Text** contains phrasing content such as //! [attention][crate::construct::attention] (emphasis, gfm strikethrough, strong), //! [raw (text)][crate::construct::raw_text] (code (text), math (text)), and actual text. //! //! The constructs found in text are: //! //! * [Attention][crat...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/construct/thematic_break.rs
Rust
//! Thematic break occurs in the [flow][] content type. //! //! ## Grammar //! //! Thematic break forms with the following BNF //! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: all markers must be identical. //! ; Restriction: at least 3 markers must be used....
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/event.rs
Rust
//! Semantic labels of things happening. use crate::unist; use crate::util::constant::TAB_SIZE; /// Semantic label of a span. #[derive(Clone, Debug, Eq, Hash, PartialEq)] pub enum Name { /// Attention sequence. /// /// > 👉 **Note**: this is used while parsing but compiled away. AttentionSequence, ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/lib.rs
Rust
//! Public API of `markdown-rs`. //! //! This module exposes primarily [`to_html()`][]. //! It also exposes [`to_html_with_options()`][] and [`to_mdast()`][]. //! //! * [`to_html()`][] //! — safe way to transform (untrusted?) markdown into HTML //! * [`to_html_with_options()`][] //! — like `to_html` but lets you co...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/mdast.rs
Rust
//! markdown syntax tree: [mdast][]. //! //! [mdast]: https://github.com/syntax-tree/mdast use crate::unist::Position; use alloc::{ fmt, string::{String, ToString}, vec::Vec, }; /// MDX: relative byte index into a string, to an absolute byte index into the /// whole document. pub type Stop = (usize, usize...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/message.rs
Rust
use crate::unist::{Point, Position}; use alloc::{boxed::Box, fmt, string::String}; #[derive(Clone, Debug, PartialEq)] pub struct Message { /// Place of message. pub place: Option<Box<Place>>, /// Reason for message (should use markdown). pub reason: String, /// Category of message. pub rule_id:...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/parser.rs
Rust
//! Turn bytes of markdown into events. use crate::event::{Event, Point}; use crate::message; use crate::state::{Name as StateName, State}; use crate::subtokenize::subtokenize; use crate::tokenizer::Tokenizer; use crate::util::location::Location; use crate::ParseOptions; use alloc::{string::String, vec, vec::Vec}; //...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/resolve.rs
Rust
//! Resolve events. use crate::construct; use crate::message; use crate::subtokenize::Subresult; use crate::tokenizer::Tokenizer; /// Names of resolvers. #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Name { /// Resolve labels. /// /// Labels are parsed as starts and ends, and when they match, merg...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/state.rs
Rust
//! States of the state machine. use crate::construct; use crate::message; use crate::tokenizer::Tokenizer; /// Result of a state. #[derive(Clone, Debug, PartialEq)] pub enum State { /// Syntax error. /// /// Only used by MDX. Error(message::Message), /// Move to [`Name`][] next. Next(Name), ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/subtokenize.rs
Rust
//! Deal with content in other content. //! //! To deal with content in content, *you* (a `markdown-rs` contributor) add //! info on events. //! Events are a flat list, but they can be connected to each other with a //! [`Link`][crate::event::Link]. //! Links must occur on [`Enter`][Kind::Enter] events only, which are ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/to_html.rs
Rust
//! Turn events into a string of HTML. use crate::event::{Event, Kind, Name}; use crate::mdast::AlignKind; use crate::util::{ character_reference::decode as decode_character_reference, constant::{SAFE_PROTOCOL_HREF, SAFE_PROTOCOL_SRC}, encode::encode, gfm_tagfilter::gfm_tagfilter, infer::{gfm_table_...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/to_mdast.rs
Rust
//! Turn events into a syntax tree. use crate::event::{Event, Kind, Name}; use crate::mdast::{ AttributeContent, AttributeValue, AttributeValueExpression, Blockquote, Break, Code, Definition, Delete, Emphasis, FootnoteDefinition, FootnoteReference, Heading, Html, Image, ImageReference, InlineCode, InlineMa...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/tokenizer.rs
Rust
//! A tokenizer glues states from the state machine together. //! //! It facilitates everything needed to turn bytes into events with a state //! machine. //! It also enables the logic needed for parsing markdown, such as an //! [`attempt`][] to try and parse something, which can succeed or, when //! unsuccessful, reve...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/unist.rs
Rust
//! abstract syntax trees: [unist][]. //! //! [unist]: https://github.com/syntax-tree/unist use alloc::fmt; /// One place in a source file. #[derive(Clone, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Point { /// 1-indexed integer representing a line in a...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/char.rs
Rust
//! Deal with bytes, chars, and kinds. use crate::util::unicode::PUNCTUATION; use alloc::{format, string::String}; use core::str; /// Character kinds. #[derive(Debug, PartialEq, Eq)] pub enum Kind { /// Whitespace. /// /// ## Example /// /// ```markdown /// > | **a_b_ c**. /// ^ ^ ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/character_reference.rs
Rust
//! Helpers for character references. use crate::util::constant::{ CHARACTER_REFERENCES, CHARACTER_REFERENCES_HTML_4, CHARACTER_REFERENCE_DECIMAL_SIZE_MAX, CHARACTER_REFERENCE_HEXADECIMAL_SIZE_MAX, CHARACTER_REFERENCE_NAMED_SIZE_MAX, }; use alloc::string::String; use core::str; /// Decode named character refe...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/constant.rs
Rust
//! Constants needed to parse markdown. //! //! Most of these constants are magic numbers, such as the number of markers //! needed to parse [code (fenced)][raw_flow] //! ([`CODE_FENCED_SEQUENCE_SIZE_MIN`][]) or the max number of allowed markers //! in a [heading (atx)][heading_atx] //! ([`HEADING_ATX_OPENING_FENCE_SIZ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/edit_map.rs
Rust
//! Deal with several changes in events, batching them together. //! //! Preferably, changes should be kept to a minimum. //! Sometimes, it’s needed to change the list of events, because parsing can be //! messy, and it helps to expose a cleaner interface of events to the compiler //! and other users. //! It can also h...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/encode.rs
Rust
//! Encode HTML. use alloc::string::String; /// Encode dangerous html characters. /// /// This ensures that certain characters which have special meaning in HTML are /// dealt with. /// Technically, we can skip `>` and `"` in many cases, but `CommonMark` /// includes them. /// /// This behavior is not explained in pr...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/gfm_tagfilter.rs
Rust
//! Make dangerous HTML a tiny bit safer. use crate::util::constant::{GFM_HTML_TAGFILTER_NAMES, GFM_HTML_TAGFILTER_SIZE_MAX}; use alloc::string::String; use core::str; extern crate std; /// Make dangerous HTML a tiny bit safer. /// /// The tagfilter is kinda weird and kinda useless. /// The tag filter is a naïve atte...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/identifier.rs
Rust
//! Info on JavaScript identifiers. use unicode_id::UnicodeID; /// Check if a character can start a JS identifier. #[must_use] pub fn id_start(char: char) -> bool { UnicodeID::is_id_start(char) || matches!(char, '$' | '_') } /// Check if a character can continue a JS (or JSX) identifier. #[must_use] pub fn id_co...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/infer.rs
Rust
//! Infer things from events. //! //! Used to share between `to_html` and `to_mdast`. use crate::event::{Event, Kind, Name}; use crate::mdast::AlignKind; use alloc::{vec, vec::Vec}; /// Figure out if a list is spread or not. /// /// When `include_items: true` is passed, infers whether the list as a whole /// is “loos...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus
src/util/line_ending.rs
Rust
use alloc::{str::FromStr, string::String}; /// Type of line endings in markdown. /// /// Particularly when working with Windows, you might want to use /// `LineEnding::CarriageReturnLineFeed`. /// /// ## Examples /// /// ``` /// use markdown::LineEnding; /// # fn main() { /// /// // Use a CR + LF combination: /// let ...
wooorm/markdown-rs
1,459
CommonMark compliant markdown parser in Rust with ASTs and extensions
Rust
wooorm
Titus