Final v0.7.1 version

This commit is contained in:
fogus 2012-06-08 11:31:59 -04:00
commit da861e5bcc
3 changed files with 61 additions and 6 deletions

View file

@ -1,6 +1,8 @@
Marginalia 0.7.1
================
![marginalia](http://farm8.staticflickr.com/7057/6828224448_32b51e5784_z_d.jpg "Marginalia")
*Ultra-lightweight literate programming[1] for [Clojure](http://clojure.org) and ClojureScript inspired by [docco](http://jashkenas.github.com/docco/)*
Marginalia is a source code documentation tool that parses Clojure and ClojureScript code and outputs a side-by-side source view with appropriate comments and docstrings aligned.
@ -116,5 +118,6 @@ Marginalia is...
- [Meikel Brandmeyer](https://github.com/kotarak)
- [Paul Dorman](https://github.com/pauldorman)
- [Deepak Giridharagopal](https://github.com/grimradical)
- [Tero Parviainen](https://github.com/teropa)
If I've missed your name then please ping me.

View file

@ -0,0 +1,50 @@
Marginalia v0.7.1 Release Notes
===============================
Marginalia is an ultra-lightweight literate programming tool for Clojure and ClojureScript inspired by [docco](http://jashkenas.github.com/docco/)*.
To get a quick look at what the output looks like, [visit the official Marginalia website](http://fogus.me/fun/marginalia/).
**Usage notes and examples are found on the [Marginalia Github page](http://github.com/fogus/marginalia).**
Places
------
* [Source code](https://github.com/fogus/marginalia)
* [Ticket system](https://github.com/fogus/marginalia/issues)
* [manifesto](http://blog.fogus.me/2011/01/05/the-marginalia-manifesto/)
Changes from v7.0.0
-------------------
### lein-marginalia
As always, the prefered way to use Marginalia to generate your documentation is via the [lein-marginalia](http://github.com/fogus/lein-marginalia) Leiningen plugin, like so:
:dev-dependencies [[lein-marginalia "0.7.1"]]
To run Marginalia, simply run `lein marg <options> <files>` in your project's directory.
### Multidoc Generation
Marginalia has long supported the generation of documentation where each namespace is contained in its own HTML file. This feature is finally exposed via the command-line/Lein interface and executed as `lein marg --multi <more options> <files>`.
### Bug fixes
* As found in enabling `--multi`
* Minor stylistic changes in the generated documentation
* More information in the project README
Plans
-----
The following capabilities are under design, development, or consideration for future versions of Marginalia:
* Nicer looking `toc.html` generation in `--multi` mode output.
* protocol docstring support
* Stand-alone application
* Explore the possibility of leveraging the [ClojureScript](http://github.com/clojure/clojurescript) analyzer.
* Explore the possibility of leveraging [sjacket](https://github.com/cgrand/sjacket)
* More documentation and examples
More planning is needed around capabilities not listed nor thought of.

View file

@ -109,7 +109,7 @@
(defn parse* [reader]
(take-while
:form
#(not= :_eof (:form %))
(flatten
(repeatedly
(fn []
@ -118,7 +118,7 @@
(let [start (.getLineNumber reader)
form (binding [*comments* sub-level-comments]
(try (. clojure.lang.LispReader
(read reader false nil false))
(read reader false :_eof false))
(catch Exception ex
(let [msg (str "Problem parsing near line " start
" <" (.readLine reader) ">"
@ -247,12 +247,14 @@
[form raw nspace-sym]
[nil raw])
(defn- literal-form? [form]
(or (string? form) (number? form) (keyword? form) (symbol? form)
(char? form) (true? form) (false? form) (instance? java.util.regex.Pattern form)))
(defmethod dispatch-form :default
[form raw nspace-sym]
;; Strings which are inlined into clojure files outside of forms are parsed
;; as `String` instances, while numbers - as `Number` subclasses.
(cond (or (string? form) (number? form) (keyword? form))
(dispatch-literal form raw nspace-sym)
(cond (literal-form? form)
(dispatch-literal form raw nspace-sym)
(and (first form)
(.isInstance clojure.lang.Named (first form))
(re-find #"^def" (-> form first name)))