trulia / hologram

A markdown based documentation system for style guides.
http://trulia.github.io/hologram
Other
2.16k stars 199 forks source link

Block Comments In Coffeescript files #232

Open lovehasnologic opened 9 years ago

lovehasnologic commented 9 years ago

I'm having an issue with hologram documentation in coffeescript files.

/*doc

*/

is invalid coffee script and results in the following error in the console:

[Error] Error: ExecJS::RuntimeError: SyntaxError: [stdin]:1:2: regular expressions cannot begin with *
  (in /path/to/file.js.coffee)
    (anonymous function) (application.js, line 1)

Wrapping it in a coffeescript block comment...

###
/*doc

*/
###

...causes the following console error.

[Error] Error: ExecJS::RuntimeError: SyntaxError: [stdin]:17:1: block comments cannot contain */
  (in /path/to/file.js.coffee)
    (anonymous function) (application.js, line 1)

Finally, using only the block comment results in no errors, but also no hologram output for the file.

###doc

###

Thoughts? My expertise rests mainly in HTML and CSS. My knowledge of Ruby/Rails is novice at best, and centers around the views and assets folders. My javascript expertise is mostly adding and removing classes on triggered events to update the interface. Therefore, apologies in advance if there is an easy answer to this issue that I missed.

ahorner commented 9 years ago

The last construct compiles to the correct value. See an example. Looking at the README, though, seems to indicate that hologram doesn't currently support documentation for any javascript pre-compilers.