Commit graph

290 commits

Author SHA1 Message Date
fogus
94cc8e2ffe Removed floating TOC (for now) as it was very inconsistent 2012-02-08 14:27:20 -05:00
fogus
8780370415 Fixed metadoc on ns. Added a line number reporting error on parse problem. 2012-02-08 11:04:40 -05:00
Deepak Giridharagopal
699ebe460f 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>
2012-01-21 09:27:51 -08:00
Ivan Miskovic
4ffc4eba5b Added semi colons everywhere 2012-01-14 23:01:51 +13:00
Ivan Miskovic
dadce0a94c Put main code in window.load rather than document.ready and at bottom of page to play nice with syntax highlighter 2012-01-14 22:50:44 +13:00
Ivan Miskovic
129e9563a2 Calculate heading height properly 2012-01-14 19:45:08 +13:00
Ivan Miskovic
f143b1852b Updated jQuery to 1.7.1 and improved floating TOC 2012-01-14 19:06:44 +13:00
fogus
7efe1c4666 Do not dispatch as a named thing if it's not a named thing. This was problematic on something like this (#{1 2 3} a) 2011-12-19 09:02:00 -05:00
fogus
8b01a596ad Keep an eye out for docstrings for def forms. Was causing issue with the likes of (def foo "not a docstring") 2011-12-19 08:24:00 -05:00
fogus
1b97660357 Fixed parsing of ns and vars that couldn't be resolved. Added processing of CLJS files. More thought around presentation of CLJS v CLJ is needed. 2011-12-16 09:35:26 -05:00
Michał Marczyk
36aecf7cdf Comment out margin: 0 in SH's css, fixes 61
Apparently this rule was preventing underscores from being displayed
(tested in recent versions of Chrome and Opera). Amusingly, searching
for a phrase including an underscore would cause it magically to
appear (in the same two browsers)...
2011-12-05 08:10:00 +01:00
zkim
7e8bb8a63d [#66] Replace Clojure brush for SH with new implementation. 2011-11-25 01:22:23 -07:00
Michał Marczyk
54103496a4 Revert ae296b3e6b
This prevents me from running tests, presumably because test projects
& namespaces are not on the classpath. We could add them to the
classpath, but at least at first glance it seems useful to be able to
parse ns-defining code blocks which are not present on the
classpath (such as those in test/marginalia/test/parse.clj).
2011-11-24 22:41:23 +01:00
Michał Marczyk
d507a3eb4e Remove duplicate filenames before generating the docs, fixes #45 2011-11-24 22:10:13 +01:00
zkim
ca3eda5594 [#68] Fix white background showing on RHS. 2011-11-23 14:59:19 -07:00
Fogus
47eeae750c Merge pull request #67 from fogus/newmain
Move application stuff out of core.clj
2011-11-23 05:00:30 -08:00
Anthony Grimes
d8cc9878bc Move application stuff out of core.clj. 2011-11-22 21:57:21 -06:00
Fogus
cb21d5921a Merge pull request #65 from budu/master
Convertion to Clojure 1.3 and some fixes.
2011-11-14 07:07:19 -08:00
Nicolas Buduroi
582972f777 Fixed section-to-html to correctly put code sections into the second cell. 2011-11-13 19:15:57 -05:00
Nicolas Buduroi
e3b54c8695 Converted the project to use Clojure 1.3.0 and got rid of contrib. 2011-11-13 19:11:55 -05:00
Nicolas Buduroi
ae296b3e6b Removed try-catch from extract-common-docstring function. 2011-11-13 13:36:11 -05:00
Fogus
52b8b2c587 Merge pull request #59 from fogus/manual-parse
Manual parse
2011-10-12 12:53:14 -07:00
Anthony Grimes
cedbcee434 Get rid of old cake plugin stuff. Newer versions of cake will have a slightly different plugin arch that breaks this. Will work on a better way to do this later. 2011-10-11 16:52:34 -05:00
Anthony Grimes
ffa1fbe793 Don't automatically try to parse a project file if the user can do it better. 2011-10-11 16:10:55 -05:00
Anthony Grimes
51acb7f3a7 New version of hiccup because the old one is breaking. 2011-10-11 16:10:21 -05:00
Fogus
4e10942dd0 Adding pauldorman 2011-10-06 09:18:45 -03:00
Fogus
32dec92b5c Merge pull request #58 from pauldorman/master
A few minor changes to the README
2011-10-06 05:17:11 -07:00
Paul Dorman
b460acf47a Hopefully improved the README. 2011-10-06 18:06:51 +13:00
Michał Marczyk
0374c221d9 Really fix handling of ::keywords using aliases
With this patch, Marginalia installs a custom keyword reader during
parsing.

This reader reuses clojure.lang.LispReader's readToken and matchSymbol
methods to read in either the whole keyword (when faced with a
single-colon keyword) or the part following the first colon (a
single-colon keyword, if we get to this case). Single-colon keywords
may have arbitrary namespace parts, so no aliasing issues arise.

The object returned depends on the type of keyword being read in:

* :foo, :foo/bar => just the keyword

* ::foo/bar => (DoubleColonKeyword. :foo/bar)

DCK's print-method writes out a single colon followed by the string
representation of the DCK's contents, for the genuine double-colon
keyword look.

Note that readToken and matchSymbol are private; this patch uses
clojure.contrib.reflect/call-method to call them.
2011-09-19 05:05:12 +02:00
Michał Marczyk
f7f63b1149 Reverting "Fix handling of ::keywords using aliases"
Evaluating ns forms which :use some symbols gets as in trouble unless
we also evaluate the relevant definitions in the other namespace. This
leads to the issue of loading the namespaces in the correct order etc.
So, if we want to be able to generate docs without compiling the whole
project, the "eval ns forms" approach is a no-go. :-(
2011-09-19 05:05:12 +02:00
Michał Marczyk
3fff515edb Fix handling of ::keywords using aliases
This patch introduces namespace tracking to Marginalia's parser: ns,
in-ns, require, use and alias forms are now evaluated in the proper
namespace at read-time. This is necessary to handle ::keywords in full
generality, since ::foo/bar is a valid token iff the symbol 'foo can
be resolved to a namespace at read time:

    (in-ns 'test)

    ::foo/bar
    ; => invalid token results in read-time error

    (require '[some.namespace :as foo])
    ::foo/bar
    ; => :some.namespace/foo

NB. only top-level #{ns in-ns require use alias} forms are recognized.
2011-09-14 20:19:49 +08:00
Fogus
142f09f75f Edited README.md via GitHub 2011-09-07 11:05:07 -03:00
fogus
191103e4eb Fixed null deps explosion 2011-09-07 08:52:14 -04:00
fogus
9850bed1ea Fixing merges 2011-09-07 08:46:34 -04:00
fogus
b54a0adb2d Moving to dog-food 0.7.0-SNAP 2011-09-07 08:44:27 -04:00
dm3
ce56099d96 Proper resource resolution in tests
When tests are run, `resources` folder is on the classpath.
2011-09-07 08:37:30 -04:00
dm3
eebf43fa83 Project testing macro properly registeres failures
Without a `deftest` assertions fail but are not registered by the test
runner which makes runners like `lein test` pass in the presence of
failures.
2011-09-07 08:37:30 -04:00
dm3
632cd45e21 Fixed link to toc generation 2011-09-07 08:37:30 -04:00
dm3
3e30d02444 Fixed documentation 2011-09-07 08:37:30 -04:00
dm3
28d386611c Default namespace sorting by name. 2011-09-07 08:37:30 -04:00
dm3
dfd435a3d4 Basic tests for uberdoc!/multidoc!
Introduced `with-project` macro which runs clojure.test assertions
against the context of a project defined in `test_projects` folder.
2011-09-07 08:37:30 -04:00
dm3
556b633bcf Generate content for $namespace.html and toc.html
`multidoc!` generates a `toc.html` file containing the toc (with links)
and project info, and a bunch of `$namespace.html` files (one for each
.clj file).
2011-09-07 08:37:30 -04:00
dm3
b76df81683 Multidoc (splitting docs into multiple pages).
Implemented basic test framework for working with source trees (similar
to what is done in http://github.com/technomancy/leiningen).
Basic functionality of writing separate source files to separate output
files.
2011-09-07 08:37:30 -04:00
fogus
0cec5a0cd1 Added mm problem case 2011-09-07 08:35:48 -04:00
fogus
bd8ce82b25 Merge branches 'master' and 'master' of github.com:fogus/marginalia 2011-09-07 08:34:56 -04:00
Fogus
7b011b059d Added Mr. Brandmeyer 2011-09-06 22:13:04 -03:00
Fogus
09be8386ea Merge pull request #56 from kotarak/feature/deleinization
Feature/deleinization
2011-09-06 18:09:55 -07:00
Meikel Brandmeyer
44389e8a31 Add command line switches for project.clj options 2011-09-06 22:27:53 +02:00
Meikel Brandmeyer
4df40cb0de Add split-deps helper 2011-09-06 22:26:50 +02:00
Meikel Brandmeyer
7640c4119c Add nil-check to dependencies-html 2011-09-06 21:35:21 +02:00