mardi 25 mars 2014

ace editor (static) to highlight code (grunt task)


Vote count:

0




I am trying to use the "ace-editor" to highlight code for a documentation. I also want to do this in a grunt task.


Has anybody done this before or knows if it is possible?


I am currently using "highlight.js" which works very well, but does not support syntax-highlighting for "less.js"


Tested: (does not highlight as I want)


hljs.highlightAuto(grunt.file.read('myfile.less')).value


Best result: (setting "java" as lang)


hljs.highlight('java',grunt.file.read('myfile.less')).value


It currently looks like this (which is OK but not perfect)

http://ift.tt/OX7wdm


Also appreciated:


any other highlighters that could work (needs to work well for .less code)


More Info



  • the documentation is for a less.js mixin library

  • I am generating the documentation from the actual library

    • using a git submodule

    • reading files and then injecting them into a template (jade)



  • generator can be found here http://ift.tt/1js4Pif



asked 1 min ago

pixelass

1,244





Aucun commentaire:

Enregistrer un commentaire