fix: remove extra braces for some incorrect macro usages (#8381)

* refactor: use `macro->text` instead of str concat

* fix(macro->text): remove redundant brackets
pull/8333/head
situ2001 2023-01-17 23:52:55 +08:00 committed by GitHub
parent efec2279a7
commit acda57e1b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -853,8 +853,8 @@
[name arguments]
(if (and (seq arguments)
(not= arguments ["null"]))
(util/format "{{{%s %s}}}" name (string/join ", " arguments))
(util/format "{{{%s}}}" name)))
(util/format "{{%s %s}}" name (string/join ", " arguments))
(util/format "{{%s}}" name)))
(declare block-content)
(declare block-container)
@ -1361,9 +1361,9 @@
:width width
:height height}]))))
[:span.warning.mr-1 {:title "Invalid URL"}
(str "{{video " url "}}")])
(macro->text "video" arguments)])
[:span.warning.mr-1 {:title "Empty URL"}
(str "{{video}}")]))
(macro->text "video" arguments)]))
(defn- macro-else-cp
[name config arguments]