aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_whitespace.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-01 11:00:39 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-01 11:00:39 +0200
commitc3fb83f7aa0f2bc5699d3a050a40af64081f78c7 (patch)
treea2117a15d8ac0e9285ec14accd0a209f9ab6b32a /src/construct/partial_whitespace.rs
parentbe62b2e29a61774100f676cfdd9b100cadf1905f (diff)
downloadmarkdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.gz
markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.tar.bz2
markdown-rs-c3fb83f7aa0f2bc5699d3a050a40af64081f78c7.zip
Refactor to clean and document `space_or_tab`
Diffstat (limited to '')
-rw-r--r--src/construct/partial_whitespace.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/construct/partial_whitespace.rs b/src/construct/partial_whitespace.rs
index 9a7a54d..62b1205 100644
--- a/src/construct/partial_whitespace.rs
+++ b/src/construct/partial_whitespace.rs
@@ -10,12 +10,18 @@
//! whitespace ::= 0.*space_or_tab eol 0.*space_or_tab
//! ```
//!
+//! This is similar to [`space_or_tab_eol`][space_or_tab_eol], with the main
+//! difference that that *does not* require a line ending and parses any
+//! `space_or_tab` with one line ending.
+//! This instead *requires* the line ending (or eol).
+//!
//! ## References
//!
//! * [`initialize/text.js` in `micromark`](https://github.com/micromark/micromark/blob/main/packages/micromark/dev/lib/initialize/text.js)
//!
//! [string]: crate::content::string
//! [text]: crate::content::text
+//! [space_or_tab_eol]: crate::construct::partial_space_or_tab::space_or_tab_eol
use super::partial_space_or_tab::space_or_tab;
use crate::tokenizer::{Code, State, StateFnResult, Tokenizer};