Browse Source

Removed double Markdown transformation

master
Julio Biason 5 years ago
parent
commit
67249d7e5a
  1. 2
      Cargo.toml
  2. 6
      src/storage/data.rs

2
Cargo.toml

@ -1,6 +1,6 @@
[package] [package]
name = "downfav" name = "downfav"
version = "0.3.0" version = "0.3.1"
authors = ["Julio Biason <julio.biason@pm.me>"] authors = ["Julio Biason <julio.biason@pm.me>"]
edition = "2018" edition = "2018"

6
src/storage/data.rs

@ -23,7 +23,7 @@ impl From<&Status> for Data {
Self { Self {
id: origin.id.to_string(), id: origin.id.to_string(),
account: origin.account.acct.to_string(), account: origin.account.acct.to_string(),
text: build_text(origin), text: dbg!(build_text(origin)),
attachments: origin attachments: origin
.media_attachments .media_attachments
.iter() .iter()
@ -48,10 +48,10 @@ fn build_text(status: &Status) -> String {
let mut result = String::new(); let mut result = String::new();
if title.len() > 0 { if title.len() > 0 {
result.push_str(title); result.push_str(title);
result.push_str("\n"); result.push_str("\n\n");
} }
result.push_str(&html2md::parse_html(&base_content)); result.push_str(&base_content);
if let Some(url) = source { if let Some(url) = source {
result.push_str("\n\n"); result.push_str("\n\n");

Loading…
Cancel
Save