Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit c2c25fe

Browse files
committed
fix: emphasized style & link
emphasized style: allow blank inside link: support '-' inside
1 parent 1768b8b commit c2c25fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typst-mode.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@
337337
(rx "*" (+ (or (syntax word) blank)) "*"))
338338

339339
(defconst typst--markup-emphasis-regexp
340-
(rx (1+ blank) "_" (1+ (not blank)) "_" (1+ blank)))
340+
(rx "_" (+ (or (syntax word) blank)) "_"))
341341

342342
(defconst typst--markup-raw-text-regexp
343343
(rx "`" (1+ (not blank)) "`"))
344344

345345
(defconst typst--markup-link-regexp
346-
(rx (or "http://" "https://") (1+ (or alnum ":" "." "/")))) ;; TODO not perfect
346+
(rx (or "http://" "https://") (1+ (or alnum ":" "." "/" "-"))))
347347

348348
(defconst typst--markup-label-regexp
349349
(rx "<" (1+ (not (any punct blank))) ">"))

0 commit comments

Comments
 (0)