aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/character_reference.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-12 14:21:53 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-12 14:21:53 +0200
commit504729a4a0c8f3e0d8fc9159e0273150b169e184 (patch)
treea6bf291322decccd6011580337b1feed6151b554 /src/construct/character_reference.rs
parentdb5a491e6c2223d1db9b458307431a54db3c40f2 (diff)
downloadmarkdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.tar.gz
markdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.tar.bz2
markdown-rs-504729a4a0c8f3e0d8fc9159e0273150b169e184.zip
Refactor to improve docs of each function
Diffstat (limited to '')
-rw-r--r--src/construct/character_reference.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/construct/character_reference.rs b/src/construct/character_reference.rs
index 476ea14..6171927 100644
--- a/src/construct/character_reference.rs
+++ b/src/construct/character_reference.rs
@@ -70,7 +70,7 @@ use crate::state::{Name as StateName, State};
use crate::tokenizer::Tokenizer;
use crate::util::slice::Slice;
-/// Start of a character reference.
+/// Start of character reference.
///
/// ```markdown
/// > | a&amp;b
@@ -93,8 +93,8 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
}
}
-/// Inside a character reference, after `&`, before `#` for numeric references
-/// or an alphanumeric for named references.
+/// After `&`, at `#` for numeric references or alphanumeric for named
+/// references.
///
/// ```markdown
/// > | a&amp;b
@@ -117,8 +117,7 @@ pub fn open(tokenizer: &mut Tokenizer) -> State {
}
}
-/// Inside a numeric character reference, right before `x` for hexadecimals,
-/// or a digit for decimals.
+/// After `#`, at `x` for hexadecimals or digit for decimals.
///
/// ```markdown
/// > | a&#123;b
@@ -141,8 +140,7 @@ pub fn numeric(tokenizer: &mut Tokenizer) -> State {
}
}
-/// Inside a character reference value, after the markers (`&#x`, `&#`, or
-/// `&`) that define its kind, but before the `;`.
+/// After markers (`&#x`, `&#`, or `&`), in value, before `;`.
///
/// The character reference kind defines what and how many characters are
/// allowed.