diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-28 17:11:04 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-28 17:12:37 +0200 |
commit | 7bb1008f508f61b51dd80086a91ada347be36c68 (patch) | |
tree | 05a652df5d4230c756ed551df37fe3346a9447d5 /src/construct/definition.rs | |
parent | 6e9447b5ec7f1823b7d08ed8f51eed23d3856cce (diff) | |
download | markdown-rs-7bb1008f508f61b51dd80086a91ada347be36c68.tar.gz markdown-rs-7bb1008f508f61b51dd80086a91ada347be36c68.tar.bz2 markdown-rs-7bb1008f508f61b51dd80086a91ada347be36c68.zip |
Add some more crosslinks to docs
Diffstat (limited to '')
-rw-r--r-- | src/construct/definition.rs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/construct/definition.rs b/src/construct/definition.rs index 6a3aceb..5e80a93 100644 --- a/src/construct/definition.rs +++ b/src/construct/definition.rs @@ -5,22 +5,20 @@ //! ```bnf //! definition ::= label ':' whitespace destination [ whitespace title ] [ space_or_tab ] //! -//! whitespace ::= eol *whitespace | 1*space_or_tab [ eol *whitespace ] -//! space_or_tab ::= ' ' | '\t' +//! ; See the `destination`, `title`, and `label` constructs for the BNF of +//! ; those parts. //! ``` //! -//! See [`destination`][destination], [`title`][title], and [`label`][label] +//! See [`destination`][destination], [`label`][label], and [`title`][title] //! for grammar, notes, and recommendations. //! //! Definitions in markdown do not, on their own, relate to anything in HTML. -//! When matched with a link (reference), they together relate to the `<a>` -//! element in HTML. -//! The definition forms its `href`, and optionally `title`, attributes. -//! See [*§ 4.5.1 The `a` element*][html-a] in the HTML spec for more info. -//! Definitions can also match with image (reference), in which case they -//! form an `<img>` element, where the definition contributes the `src`, and -//! optionally `title`, attributes. -//! See [*§ 4.8.3 The `img` element*][html-img] in the HTML spec for more info. +//! When matched with a [label end (reference)][label_end], they together +//! relate to the `<a>` or `<img>` elements in HTML. +//! The definition forms its `href` or `src`, and optionally `title`, +//! attributes. +//! See [*§ 4.5.1 The `a` element*][html-a] and +//! [*§ 4.8.3 The `img` element*][html-img] in the HTML spec for more info. //! //! The `label`, `destination`, and `title` parts are interpreted as the //! [string][] content type. @@ -86,6 +84,7 @@ //! [string]: crate::content::string //! [character_escape]: crate::construct::character_escape //! [character_reference]: crate::construct::character_reference +//! [label_end]: crate::construct::label_end //! [destination]: crate::construct::partial_destination //! [title]: crate::construct::partial_title //! [label]: crate::construct::partial_label @@ -93,8 +92,6 @@ //! [normalize_identifier]: crate::util::normalize_identifier //! [html-a]: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element //! [html-img]: https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element -//! -//! <!-- To do: link link/image (reference) --> use crate::construct::{ partial_destination::{start as destination, Options as DestinationOptions}, |