aboutsummaryrefslogtreecommitdiff
path: root/src/emitter.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-13 20:42:02 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 13:41:55 +0200
commit26cd63394f640920db4ea9402d77cec1358fb098 (patch)
tree4badbe32b41dce80c812ea08839f7367150f9e0c /src/emitter.rs
parent1edeab2b7b7d039fd9dd83bc14255bddff47618c (diff)
break!: replace set_doctype_* methods with init_ methods
Diffstat (limited to 'src/emitter.rs')
-rw-r--r--src/emitter.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emitter.rs b/src/emitter.rs
index 63ef4b1..cf22a44 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -137,15 +137,15 @@ pub trait Emitter<O> {
/// If there is no current attribute, this method may panic.
fn push_attribute_value(&mut self, s: &str);
- /// Assuming the _current token_ is a doctype, set its "public identifier" to the given string.
+ /// Assuming the _current token_ is a doctype, set its "public identifier" to the empty string.
///
/// If the current token is not a doctype, this method may panic.
- fn set_doctype_public_identifier(&mut self, value: &str);
+ fn init_doctype_public_identifier(&mut self);
- /// Assuming the _current token_ is a doctype, set its "system identifier" to the given string.
+ /// Assuming the _current token_ is a doctype, set its "system identifier" to the empty string.
///
/// If the current token is not a doctype, this method may panic.
- fn set_doctype_system_identifier(&mut self, value: &str);
+ fn init_doctype_system_identifier(&mut self);
/// Assuming the _current token_ is a doctype, append a string to its "public identifier" to the given string.
///
@@ -403,24 +403,24 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> {
let current_attr = self.current_attribute.as_mut().unwrap();
current_attr.1.value.push_str(s);
}
- fn set_doctype_public_identifier(&mut self, value: &str) {
+ fn init_doctype_public_identifier(&mut self) {
if let Some(Token::Doctype(Doctype {
ref mut public_identifier,
..
})) = self.current_token
{
- *public_identifier = Some(value.to_owned());
+ *public_identifier = Some("".to_owned());
} else {
debug_assert!(false);
}
}
- fn set_doctype_system_identifier(&mut self, value: &str) {
+ fn init_doctype_system_identifier(&mut self) {
if let Some(Token::Doctype(Doctype {
ref mut system_identifier,
..
})) = self.current_token
{
- *system_identifier = Some(value.to_owned());
+ *system_identifier = Some("".to_owned());
} else {
debug_assert!(false);
}