File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 475475 (emits " (function(){throw " throw " })()" )
476476 (emitln " throw " throw " ;" )))
477477
478+ (defn munge-param [line]
479+ (if (re-find #"@param" line)
480+ (let [[p t n & xs] (map string/trim
481+ (string/split (string/trim line) #" " ))]
482+ (if (and (= " @param" p)
483+ t #?(:clj (.startsWith ^String t " {" )
484+ :cljs (gstring/startsWith t " {" )))
485+ (string/join " " (concat [p t (munge n)] xs))
486+ line))
487+ line))
488+
478489(defn emit-comment
479490 " Emit a nicely formatted comment string."
480491 [doc jsdoc]
481492 (let [docs (when doc [doc])
482493 docs (if jsdoc (concat docs jsdoc) docs)
483494 docs (remove nil? docs)]
484495 (letfn [(print-comment-lines [e]
485- (let [[x & ys] (string/split-lines e)]
496+ (let [[x & ys] (map munge-param ( string/split-lines e) )]
486497 (emitln " * " (string/replace x " */" " * /" ))
487498 (doseq [next-line ys]
488499 (emitln " * "
You can’t perform that action at this time.
0 commit comments