From a3dd207e3b1ebcbcb6cec0f703a695e51ae4ece0 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 24 Jun 2022 17:57:10 +0200 Subject: Add link, images (resource) This is still some messy code that needs cleaning up, but it adds support for links and images, of the resource kind (`[a](b)`). References (`[a][b]`) are parsed and will soon be supported, but need matching. * Fix bug to pad percent-encoded bytes when normalizing urls * Fix bug with escapes counting as balancing in destination * Add `space_or_tab_one_line_ending`, to parse whitespace including up to one line ending (but not a blank line) * Add `ParserState` to share codes, definitions, etc --- src/construct/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/construct/mod.rs') diff --git a/src/construct/mod.rs b/src/construct/mod.rs index 9e5da0e..8565b2f 100644 --- a/src/construct/mod.rs +++ b/src/construct/mod.rs @@ -30,9 +30,9 @@ //! * [heading (setext)][heading_setext] //! * [html (flow)][html_flow] //! * [html (text)][html_text] -//! * label end -//! * label start (image) -//! * label start (link) +//! * [label end][label_end] +//! * [label start (image)][label_start_image] +//! * [label start (link)][label_start_link] //! * list //! * [paragraph][] //! * [thematic break][thematic_break] @@ -59,8 +59,6 @@ //! They also contain references to character as defined by [char][], so for //! example `ascii_punctuation` refers to //! [`char::is_ascii_punctuation`][char::is_ascii_punctuation]. -//! -//! pub mod autolink; pub mod blank_line; @@ -76,6 +74,9 @@ pub mod heading_atx; pub mod heading_setext; pub mod html_flow; pub mod html_text; +pub mod label_end; +pub mod label_start_image; +pub mod label_start_link; pub mod paragraph; pub mod partial_data; pub mod partial_destination; -- cgit