mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-03 01:55:27 +00:00
remove strip_tags as conflicting with code blocks; handle tags instead (todo)
Some checks are pending
Linux / build (push) Waiting to run
Some checks are pending
Linux / build (push) Waiting to run
This commit is contained in:
parent
8fad5ec66c
commit
51c78b878c
3 changed files with 1 additions and 10 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
|
@ -23,7 +23,6 @@ dependencies = [
|
||||||
"regex",
|
"regex",
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
"sourceview5",
|
"sourceview5",
|
||||||
"strip-tags",
|
|
||||||
"syntect",
|
"syntect",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1352,12 +1351,6 @@ version = "1.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "strip-tags"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ecd2b127e68202f5f285a116f616d5d11735cca5e4befaea0347becd445b05b2"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.117"
|
version = "2.0.117"
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ plurify = "0.2.0"
|
||||||
r2d2 = "0.8.10"
|
r2d2 = "0.8.10"
|
||||||
r2d2_sqlite = "0.32.0"
|
r2d2_sqlite = "0.32.0"
|
||||||
regex = "1.12.3"
|
regex = "1.12.3"
|
||||||
strip-tags = "0.1.0"
|
|
||||||
syntect = "5.2.0"
|
syntect = "5.2.0"
|
||||||
|
|
||||||
# development
|
# development
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ use gutter::Gutter;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use sourceview::prelude::{ActionExt, ActionMapExt, DisplayExt, ToVariant};
|
use sourceview::prelude::{ActionExt, ActionMapExt, DisplayExt, ToVariant};
|
||||||
use std::{cell::Cell, collections::HashMap, rc::Rc};
|
use std::{cell::Cell, collections::HashMap, rc::Rc};
|
||||||
use strip_tags::*;
|
|
||||||
use tags::Tags;
|
use tags::Tags;
|
||||||
|
|
||||||
pub struct Markdown {
|
pub struct Markdown {
|
||||||
|
|
@ -56,7 +55,7 @@ impl Markdown {
|
||||||
buffer.set_text(
|
buffer.set_text(
|
||||||
Regex::new(r"\n{3,}")
|
Regex::new(r"\n{3,}")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.replace_all(&strip_tags(markdown), "\n\n")
|
.replace_all(markdown, "\n\n")
|
||||||
.trim(),
|
.trim(),
|
||||||
); // @TODO extract `<img>` tags?
|
); // @TODO extract `<img>` tags?
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue