Open fourcolors opened 7 years ago
You probably want to chop of the second *
on that initial code comment, to prevent the license declaration being parsed as documentation. So, the first two lines would be:
/*
* Copyright (c) 2015-present, Facebook, Inc.
@tmcw hm... this might be an issue to do because I'm pulling in ReactNative's source code for this particular parse. It's good to know the culprit though. Is there a way to remove this when I do a .build or format?
I don't completely understand - why would that be an issue? You wouldn't remove the copyright comment, you'd only remove the second *
that precedes it, since it isn't meant to be a documentation comment.
@tmcw right, what I mean is, am I able to do this with .build
or do I need to open the file up myself and do the parsing before I run it though the builder. ie: does .build let me filter each line of the doc or something like that?
@tmcw Oh, I guess the doc that .build creates is an array I can filter though. Ok, sorry didn't understand that. I have what I need now. Thanks!
Is it attaching a comment to the 'use strict'
expression?
Yes, and afaik that's the correct behavior. The first doc block doesn't define itself as a @module
or anything else that would hide it from display as a documentation chunk.
To others coming across this who were looking how to create a file-level docblock - see http://usejsdoc.org/tags-file.html, noting that you need to provide the description in a @file
tag (although, that doesn't seem to be correctly parsed by Documentation, so I'll log a separate issue about that).
Hey given this JS doc
When I run it though the
documenation.build() ... documentation.format.md()
I get this markdownProblem is, as you'll notice on line 3, there is an empty
##
which is breaking things in ast. Am I missing something or is this a bug?