summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsko Nõmm <84135165+askonomm@users.noreply.github.com>2022-04-24 21:38:10 +0300
committerGitHub <noreply@github.com>2022-04-24 21:38:10 +0300
commitdb46256687826dc0dcb8e98f4bc7b541426225c4 (patch)
tree08550b7129de59a74f795a434129fe5f9308e5bd /src
parenteafb50c2cdf7acab4d70ec81d5f30e5b8080c257 (diff)
parent896319a90d1ae85e90700c8614e2a13584365f76 (diff)
Merge pull request #21 from askonomm/20-link-detection-fails-when-theres-a-apostrophe-in-the-label
Fix for link detection failing with an apostrophe
Diffstat (limited to 'src')
-rw-r--r--src/clarktown/renderers/link_and_image.clj4
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))))))