todomvc-backbone-es6
todomvc-backbone-es6 copied to clipboard
Any way to highlight the ES6-specific 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)
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 :)