Fix entity bug

This commit is contained in:
alex wennerberg
2024-10-08 10:27:18 -04:00
parent cc8b9b0210
commit 8d57ec3524
3 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "nanohtml2text"
version = "0.2.0"
version = "0.2.1"
edition = "2018"
readme = "README.md"
license = "MIT"

View File

@@ -1377,7 +1377,7 @@ pub static ENTITIES: &'static [(&'static str, char)] = &[
("natur", '\u{00266E}'),
("natural", '\u{00266E}'),
("naturals", '\u{002115}'),
("nbsp", ' '),
("nbsp", '\u{0000A0}'),
("ncap", '\u{002A43}'),
("ncaron", '\u{000148}'),
("ncedil", '\u{000146}'),

View File

@@ -251,7 +251,7 @@ mod tests {
h6: "<h6>Sixth</h6>next section" to "Sixth\r\n\r\nnext section",
no_h7: "<h7>Not Header</h7>next section" to "Not Headernext section",
// HTML entities
entity_nbsp: "two&nbsp;&nbsp;spaces" to "two spaces",
entity_nbsp: "two&nbsp;&nbsp;spaces" to "two\u{a0}\u{a0}spaces",
entity_copy: "&copy; 2017 K3A" to "© 2017 K3A",
entity_tag: "&lt;printtag&gt;" to "<printtag>",
entity_currencies: "would you pay in &cent;, &pound;, &yen; or &euro;?" to "would you pay in ¢, £, ¥ or €?",