Check for hyphen in dehyphen before calling str/replace
This commit is contained in:
parent
8e0d6984bd
commit
3ecac63bea
1 changed files with 2 additions and 1 deletions
|
|
@ -227,7 +227,8 @@
|
||||||
|
|
||||||
Hyphens at the start or end of a string should not be touched."
|
Hyphens at the start or end of a string should not be touched."
|
||||||
[s]
|
[s]
|
||||||
(str/replace s #"(\w)-(?=\w)" "$1 "))
|
(cond-> s
|
||||||
|
(str/includes? s "-") (str/replace #"(\w)-(?=\w)" "$1 ")))
|
||||||
|
|
||||||
(defn- namespace-_
|
(defn- namespace-_
|
||||||
"Return the namespace portion of a symbol, with dashes converted."
|
"Return the namespace portion of a symbol, with dashes converted."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue