Add Yugipedia link to card details

This commit is contained in:
kageru 2023-04-24 11:18:21 +02:00
parent 9b76a78295
commit 8bebefe996

@ -66,7 +66,7 @@ pub struct Set {
impl Card {
pub fn extended_info(&self) -> Result<String, fmt::Error> {
let mut s = String::with_capacity(1000);
write!(s, "<p>Click <a href=\"https://db.ygorganization.com/search#card:{}\">here</a> for rulings.</p>", &self.name)?;
write!(s, "<p><a href=\"https://db.ygorganization.com/search#card:{}\">Rulings</a> – <a href=\"https://yugipedia.com/wiki/{}\">Yugipedia</a></p>", &self.name, &self.name.replace(' ', "_"))?;
s.push_str("<h3>Printings:</h3>");
for printing in &self.card_sets {
write!(s, "{}: {} ({})", printing.set_name, printing.set_code, printing.set_rarity)?;