Transforming comment lines to strings should preserve intermediate whitespace where possible.
Preserving whitespace allows for indentation-sensitive markdown constructs, like code block, within comments. Signed-off-by: Deepak Giridharagopal <deepak@puppetlabs.com>
This commit is contained in:
parent
7efe1c4666
commit
699ebe460f
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,9 @@
|
|||
(dispatch-form form raw nspace-sym)))
|
||||
|
||||
(defn- ->str [m]
|
||||
(replace (-> m :form .content) #"^;+\s*" ""))
|
||||
(-> (-> m :form .content)
|
||||
(replace #"^;+\s(\s*)" "$1")
|
||||
(replace #"^;+" "")))
|
||||
|
||||
(defn merge-comments [f s]
|
||||
{:form (Comment. (str (->str f) "\n" (->str s)))
|
||||
|
|
Loading…
Reference in a new issue