Skip to content

Commit

Permalink
fix(HTML Microdata): Add itemtype attribute when encoding Organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed Feb 18, 2022
1 parent 73ad903 commit 39e7f34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rust/codec-html/src/encode/works.rs
Expand Up @@ -288,7 +288,11 @@ fn affiliation_org_to_html(org: &Organization) -> String {
.name
.as_ref()
.map_or("".to_string(), |boxed| *boxed.clone());
["<li>", &name, "</li>"].concat()
[
"<li itemtype=\"https://schema.org/Organization\" itemscope>",
&name,
"</li>"
].concat()
}

/// Generate HTML from the `BlockContent` analogue (e.g. `TableSimple`) or `InlineContent`
Expand Down

0 comments on commit 39e7f34

Please sign in to comment.