omarkhan/coffeedoc

weird stuff happens with classes defined in index.coffee

mlin opened this issue · 3 comments

mlin commented

I have a node module with an index.coffee exporting a few small classes written in that file along with classes from files in the module. I ran coffeedoc on the module directory. It seemed to trip up on the classes in index.coffee, omitting their documentation or putting it after the /html tag in the output index.html. This is easy to work around (by putting the small classes in their own files) but it was confusing, so would be worth fixing or documenting.

Thanks for this, I'll have a look. If you could post some code that reproduces the issue it would be great!

mlin commented

Sure, just put this in index.coffee and run coffeedoc on it:

class Foo
    ###
    class docstring
    ###

    constructor: ->
        ###
        constructor docstring
        ###
        console.log 'Hello, world!'

When I run this, the class docstring is missing and the constructor docstring comes out in a very weird place (after the /html tag)

Fixed in 68cc855. Good catch!