~misterio/sistemer-bot

725bca6a033a741fcc1dca251c0b510adc8ad58f — Gabriel Fontes 2 years ago ae0c8f9
conserta links das calculadoras
1 files changed, 2 insertions(+), 0 deletions(-)

M src/lib.rs
M src/lib.rs => src/lib.rs +2 -0
@@ 20,6 20,8 @@ fn sanitize_line(line: &str) -> Result<String> {
    let line = Regex::new("</?p>")?.replace_all(&line, "");
    // Remove email links
    let line = Regex::new("<a href=\"mailto:.*>(.*)</a>")?.replace(&line, "$1");
    // Fix calculadora links
    let line = Regex::new("/notes/bsi/calculadora")?.replace(&line, "https://misterio.me/notes/bsi/calculadora");

    log::info!("Em: {:?}", line);