tomfaulhaber / autodoc

The robot to automatically generate documentation for Clojure code. Used to generate the API docs for clojure.org.
121 stars 26 forks source link

Inconsistent URLs built from :web-home #6

Open fxt opened 13 years ago

fxt commented 13 years ago

The :wiki-url built for the namespace-index-info does not insert a "/" between the :web-home and the namespace file name (it assumes the given :web-home has a trailing "/"). The :wiki-url built for the var-index-info does insert a "/" between the :web-home and the var file name (it assumes the given :web-home does not end in "/").

You can easily see it in the generated index.clj. Search for :wiki-url. Either the ones in the :namespaces section have one "/" correctly and the ones in the :vars section have a "//" in the middle of the URL, or the former are missing the "/" and the latter are correct.

Inserting "/" at line 493 of build_html.clj would fix the problem. Even better, adding a normalization step to turn "//" and things like "/./" into "/" would make things even cleaner.