remove strip_tags as conflicting with code blocks; handle tags instead (todo)
Some checks are pending
Linux / build (push) Waiting to run

This commit is contained in:
yggverse 2026-04-02 20:43:50 +03:00
parent 8fad5ec66c
commit 51c78b878c
3 changed files with 1 additions and 10 deletions

7
Cargo.lock generated
View file

@ -23,7 +23,6 @@ dependencies = [
"regex",
"rusqlite",
"sourceview5",
"strip-tags",
"syntect",
]
@ -1352,12 +1351,6 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "strip-tags"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd2b127e68202f5f285a116f616d5d11735cca5e4befaea0347becd445b05b2"
[[package]]
name = "syn"
version = "2.0.117"

View file

@ -42,7 +42,6 @@ plurify = "0.2.0"
r2d2 = "0.8.10"
r2d2_sqlite = "0.32.0"
regex = "1.12.3"
strip-tags = "0.1.0"
syntect = "5.2.0"
# development

View file

@ -15,7 +15,6 @@ use gutter::Gutter;
use regex::Regex;
use sourceview::prelude::{ActionExt, ActionMapExt, DisplayExt, ToVariant};
use std::{cell::Cell, collections::HashMap, rc::Rc};
use strip_tags::*;
use tags::Tags;
pub struct Markdown {
@ -56,7 +55,7 @@ impl Markdown {
buffer.set_text(
Regex::new(r"\n{3,}")
.unwrap()
.replace_all(&strip_tags(markdown), "\n\n")
.replace_all(markdown, "\n\n")
.trim(),
); // @TODO extract `<img>` tags?