forked from AkkomaGang/akkoma
formatting
This commit is contained in:
parent
4fb64c1d86
commit
b832df1e15
1 changed files with 2 additions and 0 deletions
|
@ -262,6 +262,7 @@ def render(
|
||||||
|
|
||||||
def render_content(%{"type" => "Note"} = object) do
|
def render_content(%{"type" => "Note"} = object) do
|
||||||
summary = object["summary"]
|
summary = object["summary"]
|
||||||
|
|
||||||
content =
|
content =
|
||||||
if !!summary and summary != "" do
|
if !!summary and summary != "" do
|
||||||
"<p>#{summary}</p>#{object["content"]}"
|
"<p>#{summary}</p>#{object["content"]}"
|
||||||
|
@ -274,6 +275,7 @@ def render_content(%{"type" => "Note"} = object) do
|
||||||
|
|
||||||
def render_content(%{"type" => "Article"} = object) do
|
def render_content(%{"type" => "Article"} = object) do
|
||||||
summary = object["name"] || object["summary"]
|
summary = object["name"] || object["summary"]
|
||||||
|
|
||||||
content =
|
content =
|
||||||
if !!summary and summary != "" do
|
if !!summary and summary != "" do
|
||||||
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
|
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
|
||||||
|
|
Loading…
Reference in a new issue