magic! now it works on web kit
This commit is contained in:
parent
33416e8963
commit
3a4eb87ca0
17 changed files with 164 additions and 116 deletions
|
@ -527,7 +527,8 @@ where
|
|||
escape_html(&mut self.writer, &branch.attributes.id)?;
|
||||
self.writer.write_str("\">")?;
|
||||
}
|
||||
self.writer.write_str("<img is=\"th-emoji\" title=\":")?;
|
||||
self.writer
|
||||
.write_str("<img data-cast=\"emoji\" title=\":")?;
|
||||
escape_html(&mut self.writer, name)?;
|
||||
self.writer.write_str(":\" src=\"")?;
|
||||
escape_html(&mut self.writer, &self.config.site)?;
|
||||
|
|
|
@ -45,9 +45,9 @@ pub fn branch_to_html(
|
|||
}
|
||||
|
||||
let component = if let Content::Link(_) = branch.attributes.content {
|
||||
"th-b-linked"
|
||||
"b-linked"
|
||||
} else {
|
||||
"th-b"
|
||||
"b"
|
||||
};
|
||||
|
||||
let linked_branch = if let Content::Link(link) = &branch.attributes.content {
|
||||
|
@ -64,7 +64,7 @@ pub fn branch_to_html(
|
|||
|
||||
write!(
|
||||
s,
|
||||
"<li is=\"{component}\" class=\"{class}\" id=\"{}\"{linked_branch}{do_not_persist}>",
|
||||
"<li data-cast=\"{component}\" class=\"{class}\" id=\"{}\"{linked_branch}{do_not_persist}>",
|
||||
EscapeAttribute(&branch.html_id)
|
||||
)
|
||||
.unwrap();
|
||||
|
|
|
@ -107,7 +107,7 @@ pub enum Content {
|
|||
|
||||
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)]
|
||||
pub struct Classes {
|
||||
/// Classes to append to the branch itself (<li is="th-b">).
|
||||
/// Classes to append to the branch itself (<li data-cast="b">).
|
||||
#[serde(default)]
|
||||
pub branch: String,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue