Fix test
This commit is contained in:
parent
daf9149b04
commit
1e1eb7786e
2 changed files with 6 additions and 4 deletions
|
@ -65,8 +65,8 @@
|
||||||
|
|
||||||
(defn insert-into-post [item index insertion-element]
|
(defn insert-into-post [item index insertion-element]
|
||||||
(let [condition (if (vector? item)
|
(let [condition (if (vector? item)
|
||||||
(every? true? [(= (first item) :section)
|
(every? true? [(= (first item) :article)
|
||||||
(= (:class (second item)) "mastodon-post-content")])
|
(= (:class (second item)) "mastodon-post")])
|
||||||
false)]
|
false)]
|
||||||
(if condition
|
(if condition
|
||||||
(insert item index insertion-element)
|
(insert item index insertion-element)
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
html))
|
html))
|
||||||
|
|
||||||
(defn insert-link-prev [html]
|
(defn insert-link-prev [html]
|
||||||
(postwalk #(insert-into-post % 3 link_preview) html))
|
(postwalk #(insert-into-post % 4 link_preview) html))
|
||||||
|
|
||||||
(defn masto-link-prev->html [html card]
|
(defn masto-link-prev->html [html card]
|
||||||
(let [{:keys [url image title description]} card]
|
(let [{:keys [url image title description]} card]
|
||||||
|
|
|
@ -127,7 +127,9 @@
|
||||||
[:section
|
[:section
|
||||||
{:class "mastodon-post-content"}
|
{:class "mastodon-post-content"}
|
||||||
[:p {:class "mastodon-post-text"} "POST_TEXT"]
|
[:p {:class "mastodon-post-text"} "POST_TEXT"]
|
||||||
[:img {:class "mastodon-post-image", :src "POST_IMG_URL"}]]
|
[:img
|
||||||
|
{:class "mastodon-post-image",
|
||||||
|
:src "https://cdn.masto.host/socialmeissagmbhde/media_attachments/files/112/432/505/467/393/505/small/0d01ddb07440328e.jpg"}]]
|
||||||
[:footer
|
[:footer
|
||||||
{:class "mastodon-post-footer"}
|
{:class "mastodon-post-footer"}
|
||||||
[:button
|
[:button
|
||||||
|
|
Loading…
Reference in a new issue