diff options
| author | Asko Nõmm <asko@bien.ee> | 2022-04-24 21:36:30 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@bien.ee> | 2022-04-24 21:36:30 +0300 |
| commit | 896319a90d1ae85e90700c8614e2a13584365f76 (patch) | |
| tree | 08550b7129de59a74f795a434129fe5f9308e5bd /src/clarktown | |
| parent | a93aac82d2f19a1eaccfe3799d09e0438fa357eb (diff) | |
Fix for link detection failing with an apostrophe
Diffstat (limited to 'src/clarktown')
| -rw-r--r-- | src/clarktown/renderers/link_and_image.clj | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clarktown/renderers/link_and_image.clj b/src/clarktown/renderers/link_and_image.clj index e61503e..7e06db5 100644 --- a/src/clarktown/renderers/link_and_image.clj +++ b/src/clarktown/renderers/link_and_image.clj @@ -13,7 +13,7 @@ "Renders all occurring links and images." [block _ _] (loop [block block - matches (-> (re-seq #"\!?\[([a-zA-Z0-9\-\.\,]+( [a-zA-Z0-9\-\.\,]+)*)\]\((.*?)\)" block) + matches (-> (re-seq #"\!?\[([a-zA-Z0-9\-\_\.\,\']+( [a-zA-Z0-9\-\_\.\,\']+)*)\]\((.*?)\)" block) distinct)] (if (empty? matches) block @@ -24,4 +24,4 @@ (recur (if image? (string/replace block whole-match image) (string/replace block whole-match link)) - (drop 1 matches))))))
\ No newline at end of file + (drop 1 matches)))))) |
