make hashtags work in profile summary (#562)
* make hashtags work in profile summary fix #541 * cargo fmt
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ pub fn create(
|
||||
let domain = &Instance::get_local(conn)?.public_domain;
|
||||
let (content, mentions, hashtags) = md_to_html(
|
||||
&payload.source,
|
||||
domain,
|
||||
Some(domain),
|
||||
false,
|
||||
Some(Media::get_media_processor(conn, vec![&author])),
|
||||
);
|
||||
|
||||
+1
-1
@@ -293,7 +293,7 @@ pub fn update(
|
||||
blog.summary_html = SafeString::new(
|
||||
&utils::md_to_html(
|
||||
&form.summary,
|
||||
"",
|
||||
None,
|
||||
true,
|
||||
Some(Media::get_media_processor(
|
||||
&conn,
|
||||
|
||||
@@ -42,9 +42,11 @@ pub fn create(
|
||||
.map(|_| {
|
||||
let (html, mentions, _hashtags) = utils::md_to_html(
|
||||
form.content.as_ref(),
|
||||
&Instance::get_local(&conn)
|
||||
.expect("comments::create: local instance error")
|
||||
.public_domain,
|
||||
Some(
|
||||
&Instance::get_local(&conn)
|
||||
.expect("comments::create: local instance error")
|
||||
.public_domain,
|
||||
),
|
||||
true,
|
||||
Some(Media::get_media_processor(&conn, vec![&user])),
|
||||
);
|
||||
|
||||
+10
-6
@@ -262,9 +262,11 @@ pub fn update(
|
||||
} else {
|
||||
let (content, mentions, hashtags) = utils::md_to_html(
|
||||
form.content.to_string().as_ref(),
|
||||
&Instance::get_local(&conn)
|
||||
.expect("posts::update: Error getting local instance")
|
||||
.public_domain,
|
||||
Some(
|
||||
&Instance::get_local(&conn)
|
||||
.expect("posts::update: Error getting local instance")
|
||||
.public_domain,
|
||||
),
|
||||
false,
|
||||
Some(Media::get_media_processor(
|
||||
&conn,
|
||||
@@ -432,9 +434,11 @@ pub fn create(
|
||||
|
||||
let (content, mentions, hashtags) = utils::md_to_html(
|
||||
form.content.to_string().as_ref(),
|
||||
&Instance::get_local(&conn)
|
||||
.expect("post::create: local instance error")
|
||||
.public_domain,
|
||||
Some(
|
||||
&Instance::get_local(&conn)
|
||||
.expect("post::create: local instance error")
|
||||
.public_domain,
|
||||
),
|
||||
false,
|
||||
Some(Media::get_media_processor(
|
||||
&conn,
|
||||
|
||||
Reference in New Issue
Block a user