Add line break before inline-quote block
This commit is contained in:
parent
d368ef7493
commit
448b5afa88
2 changed files with 3 additions and 3 deletions
|
@ -76,7 +76,7 @@ pub fn get_note_content(object: &Object) -> Result<String, ValidationError> {
|
||||||
let object_url = parse_object_url(value)
|
let object_url = parse_object_url(value)
|
||||||
.map_err(|_| ValidationError("invalid object URL"))?;
|
.map_err(|_| ValidationError("invalid object URL"))?;
|
||||||
content += &format!(
|
content += &format!(
|
||||||
r#"<p><a href="{0}" target="_blank" rel="noopener">{0}</a></p>"#,
|
r#"<br><p><a href="{0}" target="_blank" rel="noopener">{0}</a></p>"#,
|
||||||
object_url,
|
object_url,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -423,7 +423,7 @@ mod tests {
|
||||||
let content = get_note_content(&object).unwrap();
|
let content = get_note_content(&object).unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
content,
|
content,
|
||||||
r#"test-content<p><a href="https://example.org/xyz" target="_blank" rel="noopener">https://example.org/xyz</a></p>"#,
|
r#"test-content<br><p><a href="https://example.org/xyz" target="_blank" rel="noopener">https://example.org/xyz</a></p>"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ async fn create_status(
|
||||||
};
|
};
|
||||||
// Append inline quote and add author to mentions
|
// Append inline quote and add author to mentions
|
||||||
post_data.content += &format!(
|
post_data.content += &format!(
|
||||||
r#"<p class="inline-quote">RE: <a href="{0}">{0}</a></p>"#,
|
r#"<br><br><p class="inline-quote">RE: <a href="{0}">{0}</a></p>"#,
|
||||||
linked.get_object_id(&instance.url()),
|
linked.get_object_id(&instance.url()),
|
||||||
);
|
);
|
||||||
post_data.mentions.push(linked.author.id);
|
post_data.mentions.push(linked.author.id);
|
||||||
|
|
Loading…
Reference in a new issue