mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-22 08:01:09 +00:00
Disable markdown plugins for url shortening and smartquotes (fixes #53)
This commit is contained in:
parent
572a0cb51c
commit
3050617005
3 changed files with 38 additions and 29 deletions
|
@ -99,7 +99,7 @@ fn create_cookie(jwt: String, data: &Data<IbisData>) -> Cookie<'static> {
|
|||
// Must not set cookie domain on localhost
|
||||
// https://stackoverflow.com/a/1188145
|
||||
let domain = data.domain().to_string();
|
||||
if domain.starts_with("localhost") || domain.starts_with("127.0.0.1") {
|
||||
if !domain.starts_with("localhost") && !domain.starts_with("127.0.0.1") {
|
||||
cookie = cookie.domain(domain);
|
||||
}
|
||||
cookie
|
||||
|
|
|
@ -9,7 +9,10 @@ use markdown_it::{
|
|||
pub fn markdown_parser() -> MarkdownIt {
|
||||
let mut parser = MarkdownIt::new();
|
||||
markdown_it::plugins::cmark::add(&mut parser);
|
||||
markdown_it::plugins::extra::add(&mut parser);
|
||||
markdown_it::plugins::extra::linkify::add(&mut parser);
|
||||
markdown_it::plugins::extra::strikethrough::add(&mut parser);
|
||||
markdown_it::plugins::extra::tables::add(&mut parser);
|
||||
markdown_it::plugins::extra::typographer::add(&mut parser);
|
||||
parser.inline.add_rule::<ArticleLinkScanner>();
|
||||
parser
|
||||
}
|
||||
|
|
|
@ -131,10 +131,16 @@ pub fn EditArticle() -> impl IntoView {
|
|||
})
|
||||
}}
|
||||
|
||||
<textarea id="edit-article-textarea" rows=rows on:keyup=move |ev| {
|
||||
<textarea
|
||||
id="edit-article-textarea"
|
||||
rows=rows
|
||||
on:keyup=move |ev| {
|
||||
let val = event_target_value(&ev);
|
||||
set_text.update(|p| *p = val);
|
||||
}>{article.article.text.clone()}</textarea>
|
||||
}
|
||||
>
|
||||
{article.article.text.clone()}
|
||||
</textarea>
|
||||
<div>
|
||||
<a href="https://commonmark.org/help/" target="blank_">
|
||||
Markdown
|
||||
|
|
Loading…
Reference in a new issue