{"_id":"highlight","_rev":"4203323","name":"highlight","description":"Highlight code syntax with node.js","dist-tags":{"latest":"0.2.4"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"time":{"modified":"2026-03-03T01:29:46.000Z","created":"2011-06-03T10:03:21.834Z","0.2.4":"2015-09-11T12:52:11.884Z","0.2.3":"2012-08-14T06:46:55.593Z","0.2.2":"2012-04-13T07:27:37.956Z","0.2.1":"2012-01-22T20:26:04.296Z","0.2.0":"2011-07-11T08:57:39.296Z","0.1.0":"2011-06-03T10:03:21.834Z"},"users":{},"author":{"name":"Andris Reinman"},"repository":{"type":"git","url":"git+ssh://git@github.com/andris9/highlight.git"},"versions":{"0.2.4":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.2.4","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"git+ssh://git@github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"gitHead":"a955fd043e73a5d304e0987515641f1075bb88b2","bugs":{"url":"https://github.com/andris9/highlight/issues"},"homepage":"https://github.com/andris9/highlight#readme","_id":"highlight@0.2.4","scripts":{},"_shasum":"8ac02875b03f5935e0675852b76cfe1fd58e0dff","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"andris","email":"andris@kreata.ee"},"dist":{"shasum":"8ac02875b03f5935e0675852b76cfe1fd58e0dff","size":139667,"noattachment":false,"key":"/highlight/-/highlight-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.2.4.tgz"},"deprecated":"Not maintained anymore","publish_time":1441975931884,"_hasShrinkwrap":false,"_cnpm_publish_time":1441975931884,"_cnpmcore_publish_time":"2021-12-18T20:34:57.908Z"},"0.2.3":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.2.3","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"http://github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"_id":"highlight@0.2.3","dist":{"shasum":"67ab9b871ac0c8e476c64c0112f90ba74f2547ee","size":135566,"noattachment":false,"key":"/highlight/-/highlight-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.2.3.tgz"},"publish_time":1344926815593,"deprecated":"Not maintained anymore","_hasShrinkwrap":false,"_cnpm_publish_time":1344926815593,"_cnpmcore_publish_time":"2021-12-18T20:34:58.189Z"},"0.2.2":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.2.2","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"git://github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"_npmUser":{"name":"andris","email":"andris@node.ee"},"_id":"highlight@0.2.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"2360d9c7e536fe3f5ffeb2759dbf2d9a827185e3","size":132787,"noattachment":false,"key":"/highlight/-/highlight-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.2.2.tgz"},"publish_time":1334302057956,"deprecated":"Not maintained anymore","_hasShrinkwrap":false,"_cnpm_publish_time":1334302057956,"_cnpmcore_publish_time":"2021-12-18T20:34:58.479Z"},"0.2.1":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.2.1","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"git://github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"_npmUser":{"name":"andris","email":"andris@node.ee"},"_id":"highlight@0.2.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"137d9ba6ef034f3af4c1b96a551fa241d748254a","size":141237,"noattachment":false,"key":"/highlight/-/highlight-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.2.1.tgz"},"publish_time":1327263964296,"deprecated":"Not maintained anymore","_hasShrinkwrap":false,"_cnpm_publish_time":1327263964296,"_cnpmcore_publish_time":"2021-12-18T20:34:58.796Z"},"0.2.0":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.2.0","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"git://github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"_npmJsonOpts":{"file":"/root/.npm/highlight/0.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"highlight@0.2.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"3dfbc27877c19cfc95ed59d9751e40aeaec2e088","size":138329,"noattachment":false,"key":"/highlight/-/highlight-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.2.0.tgz"},"scripts":{},"publish_time":1310374659296,"deprecated":"Not maintained anymore","_hasShrinkwrap":false,"_cnpm_publish_time":1310374659296,"_cnpmcore_publish_time":"2021-12-18T20:34:59.020Z"},"0.1.0":{"name":"highlight","description":"Highlight code syntax with node.js","version":"0.1.0","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"},{"name":"guileen","email":""}],"repository":{"type":"git","url":"http://github.com/andris9/highlight.git"},"directories":{"lib":"./lib"},"main":"./lib/highlight","licenses":[{"type":"BSD","url":"http://github.com/andris9/highlight/blob/master/LICENSE"}],"_id":"highlight@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"shasum":"f85029b5d0a13841c5a30a59cd7bf7a94f9783ca","size":126874,"noattachment":false,"key":"/highlight/-/highlight-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/highlight/download/highlight-0.1.0.tgz"},"publish_time":1307095401834,"deprecated":"Not maintained anymore","_hasShrinkwrap":false,"_cnpm_publish_time":1307095401834,"_cnpmcore_publish_time":"2021-12-18T20:34:59.279Z"}},"readme":"DEPRECATION NOTICE\n==================\n\nThis project is deprecated in favor of [isagalaev/highlight.js](https://github.com/isagalaev/highlight.js). I never created the parser myself, the module was created in the early days of node as a wrapper for an existing browser based parser [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) so if you are using this module and have problems with the parsing logic, I can't help you much as I'm not familiar with the inner details.\n\nPull requests are still welcomed - if you find a bug and fix it, then I'll pull the change in but I won't be fixing the bugs myself. Sorry for that.\n\nhighlight\n==============\n\n**highlight** for node.js is based on [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) parser and is meant to highlight code syntax in languages that are not known beforehand (*highlight.js* detects the used language automatically). This is especially important for pages in Markdown format - there's no easy way to know which language is actually used.\n\nInstallation\n------------\n\nUse `npm` package manager\n\n    npm install highlight\n\nUsage\n-----\n\nInclude syntax highlighter\n\n    var hl = require(\"highlight\").Highlight;\n    \nhighlight code\n\n    html = hl(\"for(var i=0;i<10;i++)alert(i);\");\n\nuse special tab replacing string (default is 4 spaces)\n\n    html = hl(code_string, \"<span>  </span>\");\n\nconvert code only between &lt;code&gt; blocks (leaves everything else as is) - especially useful if used together with converted [Markdown](/andris9/node-markdown) syntax that includes &lt;code&gt; blocks.\n\n    html = hl(\"<p>PHP:</p><code><?php echo 'Hello world!';?></code>\", false, true);\n\nStyles\n------\n\n**highlight** outputs HTML code with predefined CSS class names for different elements. This doesn't make a lot of sense by default (it's just a bunch of SPAN's) so you need to use a CSS file that sets the used color set for the highlighting. There's some sample CSS files in /lib/vendor/highlight.js/styles that can be used with no modification - just include one of the files in the page you are showing the highlighted code.\n\n    <link rel=\"stylesheet\" href=\"/path/to/styles/default.css\"/>\n","_attachments":{},"homepage":"https://github.com/andris9/highlight#readme","bugs":{"url":"https://github.com/andris9/highlight/issues"}}