Fix Twitter's rename breaking macro wrapping (#11325)

* FIX twitter's rename causing automatic macro wrapping to not work

* ADD test to check for x => twitter macro expansion
This commit is contained in:
Noah Pederson
2024-05-31 01:47:10 -05:00
committed by GitHub
parent eb126978dc
commit b70768daa7
3 changed files with 20 additions and 3 deletions

View File

@@ -52,7 +52,7 @@
(boolean (text-util/get-matched-video url))
(util/format "{{video %s}}" url)
(string/includes? url "twitter.com")
(or (string/includes? url "twitter.com") (string/includes? url "x.com"))
(util/format "{{twitter %s}}" url)))
(defn- try-parse-as-json