aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/identifier.rs2
-rw-r--r--src/util/sanitize_uri.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/util/identifier.rs b/src/util/identifier.rs
index 4887e02..3c47e20 100644
--- a/src/util/identifier.rs
+++ b/src/util/identifier.rs
@@ -3,11 +3,13 @@
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_cont(char: char, jsx: bool) -> bool {
UnicodeID::is_id_continue(char)
|| matches!(char, '\u{200c}' | '\u{200d}')
diff --git a/src/util/sanitize_uri.rs b/src/util/sanitize_uri.rs
index 8e44758..7006ace 100644
--- a/src/util/sanitize_uri.rs
+++ b/src/util/sanitize_uri.rs
@@ -10,9 +10,9 @@ use alloc::{
/// Make a value safe for injection as a URL.
///
/// This encodes unsafe characters with percent-encoding and skips already
-/// encoded sequences (see [`normalize`][] below).
+/// encoded sequences (see `normalize` below).
/// Further unsafe characters are encoded as character references (see
-/// [`encode`][]).
+/// `encode`).
///
/// ## Examples
///