We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c9fd8d commit bd58672Copy full SHA for bd58672
markup5ever/build.rs
@@ -98,6 +98,17 @@ fn named_entities_to_phf(from: &Path, to: &Path) {
98
}
99
100
let mut file = File::create(to).unwrap();
101
+ writeln!(&mut file, r#"
102
+/// A map of entity names to their codepoints. The second codepoint will
103
+/// be 0 if the entity contains a single codepoint. Entities have their preceeding '&' removed.
104
+///
105
+/// # Examples
106
107
+/// ```
108
+/// use markup5ever::data::NAMED_ENTITIES;
109
110
+/// assert_eq!(NAMED_ENTITIES.get("gt;").unwrap(), &(62, 0));
111
+"#).unwrap();
112
write!(&mut file, "pub static NAMED_ENTITIES: Map<&'static str, (u32, u32)> = ").unwrap();
113
phf_map.build(&mut file).unwrap();
114
write!(&mut file, ";\n").unwrap();
0 commit comments