Skip to content

Commit

Permalink
Add emoji to page title
Browse files Browse the repository at this point in the history
  • Loading branch information
lindhe committed Aug 12, 2023
1 parent 4292c2b commit fa1a4b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ fn get_webicon(family: &str, id: &str, vendor: Option<String>) -> (ContentType,
let family: WebiconFamily = WebiconFamily::from_str(family).expect("Invalid webicon family.");
let id = normalize_id(id, family);

// TODO: Remove these when things works with HTML.
let emoji = get_emoji_from_id(&id).as_str();
println!("TODO: Emoji with ID {}: {}", id, emoji);

let metadata = get_metadata(DEFAULT_CONFIG_FILE_PATH, family, &vendor);
let html = make_html(&metadata, &id);
let emoji = get_emoji_from_id(&id).as_str();
let title = format!("{} ({})", emoji, id);
let html = make_html(&metadata, &title);

(ContentType::HTML, html.to_string())
}
Expand Down

0 comments on commit fa1a4b3

Please sign in to comment.