todomvc-backbone-es6 icon indicating copy to clipboard operation
todomvc-backbone-es6 copied to clipboard

Any way to highlight the ES6-specific comments?

Open domenic opened this issue 10 years ago • 1 comments

This might not be something docco is very good at---maybe a post-processing step that works off of some tag (#es6) or something would be better---but it would be cool if the ES6-feature-specific comments were in a different color, or maybe italic, or something. Maybe even a third column O_O. Commenting on the program logic is very different from commenting on the syntax, and I suspect most audiences will be interested in the ES6 syntax (at least for the next few years; once ES6 is commonplace I'm sure people will just be using this as the canonical Todo app reference and ignore all the syntax comments :P)

domenic avatar Aug 21 '13 05:08 domenic

I'm glad someone else thought this might be a good idea too :) I'd considered whether it would be a good idea to highlight both the ES6-specific comments as well as the ES6-specific lines of code. I don't think docco supports this type of behaviour, but we could use custom annotations + some scripting to:

  • Detect es6-specific comments/code blocks
  • Remove the annotations
  • Highlight

on page load. Will leave this open for discussion as there may be a better way of doing this :)

addyosmani avatar Aug 21 '13 13:08 addyosmani