Skip to content

Commit

Permalink
And this was the code that triggered clj-commons#161
Browse files Browse the repository at this point in the history
The root cause is parse problem, most like of Emacs backup or recovery files
  • Loading branch information
mattiasw2 committed Oct 10, 2016
1 parent 3e01ee4 commit 08bdfed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/marginalia/parser.clj
Expand Up @@ -303,7 +303,8 @@
(dispatch-inner-form form raw nspace-sym)))

(defn extract-docstring [m raw nspace-sym]
(let [raw (join "\n" (subvec raw (-> m :start dec) (:end m)))
(let [end (min (:end m) (count raw))
raw (join "\n" (subvec raw (-> m :start dec) end))
form (:form m)]
(dispatch-form form raw nspace-sym)))

Expand Down

0 comments on commit 08bdfed

Please sign in to comment.