3

I am using docco as a tool for creating coffeescript documentation.

By default, every comment I make in coffeescript source is treated as documentation and moved to the left (explainatory) column. The problem is, in my source there are some lines of code commented out, left as alternate options, which I want to remain in the right (code) column.

Is there a way to tell docco- "do not touch that, leave this like it is a normal code"? "#!" or "#ignore" maybe? Thanks in advance.

Jack L.
  • 1,257
  • 2
  • 17
  • 37

1 Answers1

1

Have you tried it? It will ignore #! hashbang lines.

Ignore hashbangs and interpolations...

        l.commentFilter = /(^#![/]|^\s*#\{)/
      languages
    languages = buildMatchers languages

From the source, line 277 https://github.com/jashkenas/docco/blob/master/docco.litcoffee

If nothing else, you should be able to edit the source to add whatever opt out you would like there.

Ben McCormick
  • 25,260
  • 12
  • 52
  • 71
  • To be honest- yes. But I'll try again; maybe I haven't noticed it working ("#!"-idea was just blind-guessed). Edit: Yes, it does not work. Should I pass any parameter to docco? – Jack L. Sep 17 '13 at 10:21
  • strange. If you look at line 277 of the source you can see it tries to ignore those https://github.com/jashkenas/docco/blob/master/docco.litcoffee – Ben McCormick Sep 17 '13 at 14:39
  • 1
    as the code above impies,using `#{ ignored by docco` works for me. – lab419 Jan 27 '14 at 10:40
  • Thank you so much, lab419; #{ makes it behave as I'd like it to do – Jack L. Feb 19 '14 at 15:22