Procházet zdrojové kódy

fix: match paste of x.com links for twitter (#12043)

Co-authored-by: sarab <[email protected]>
gissehel před 2 měsíci
rodič
revize
472ea34590
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/main/frontend/handler/paste.cljs

+ 2 - 1
src/main/frontend/handler/paste.cljs

@@ -52,7 +52,8 @@
     (boolean (text-util/get-matched-video url))
     (util/format "{{video %s}}" url)
 
-    (or (string/includes? url "twitter.com") (string/includes? url "x.com"))
+    (or (re-matches #"^https://twitter\.com.*?$" url)
+        (re-matches #"^https://x\.com.*?$" url))
     (util/format "{{twitter %s}}" url)))
 
 (defn- try-parse-as-json