Add Yugipedia link to card details
This commit is contained in:
parent
9b76a78295
commit
8bebefe996
@ -66,7 +66,7 @@ pub struct Set {
|
|||||||
impl Card {
|
impl Card {
|
||||||
pub fn extended_info(&self) -> Result<String, fmt::Error> {
|
pub fn extended_info(&self) -> Result<String, fmt::Error> {
|
||||||
let mut s = String::with_capacity(1000);
|
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>");
|
s.push_str("<h3>Printings:</h3>");
|
||||||
for printing in &self.card_sets {
|
for printing in &self.card_sets {
|
||||||
write!(s, "{}: {} ({})", printing.set_name, printing.set_code, printing.set_rarity)?;
|
write!(s, "{}: {} ({})", printing.set_name, printing.set_code, printing.set_rarity)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user