gruntjs - ace editor (static) to highlight code (grunt task) -
i trying use "ace-editor" highlight code documentation. want in grunt task.
has done before or knows if possible?
i using "highlight.js" works well, not support syntax-highlighting "less.js"
tested: (does not highlight want)
hljs.highlightauto(grunt.file.read('myfile.less')).value
best result: (setting "java" lang)
hljs.highlight('java',grunt.file.read('myfile.less')).value
it looks (which ok not perfect)
http://more-or-less.org/
also appreciated:
any other highlighters work (needs work .less code)
more info
- the documentation less.js mixin library
- i generating documentation actual library
- using git submodule
- reading files , injecting them template (jade)
- generator can found here https://github.com/pixelass/more-or-less-docs
you can find ace demo using highlighter @ https://github.com/ajaxorg/ace/blob/master/demo/static-highlighter/server.js need create wrapper that, provides same api hljs
calls ace interanlly.
Comments
Post a Comment