{"_id":"highlight","_rev":"29-69798ca9f56cad1dfc3a55a60f34ea04","name":"highlight","description":"Highlight code syntax with node.js","dist-tags":{"latest":"0.2.4"},"versions":{"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@node.ee"}],"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":{"tarball":"https://registry.npmjs.org/highlight/-/highlight-0.1.0.tgz","shasum":"f85029b5d0a13841c5a30a59cd7bf7a94f9783ca","integrity":"sha512-w4mV0LqsJdifLPSYrWCvhNvRi5IwxbTII1NX8W1bch6M4becFUct8YU0S8t5wQUZO9aI7LubQdZeKReTs+5heA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEK0O/a8zMB9zK80fTP++mwVOAJgVSUmv8ObSODEBV4AiA8BCXq5f3dWHrTfdkHOzEz295g3ErU+PvapHgk5Z2QJg=="}]},"deprecated":"Not maintained anymore"},"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@node.ee"}],"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","tarball":"https://registry.npmjs.org/highlight/-/highlight-0.2.0.tgz","integrity":"sha512-3KywxGMZoDy85WOWcTPg8Z08MVJh44n45jbJbdh4AtJaiOE0F5POCO4ZeUR/Ri1UBLmvDUaKA53NUK2g38jGRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/6xUeShTHXmNcLN/L65njS6ikazTH9bXLAzzaQmufiAiEA9gomL52MxmFpcPlVXktLk0Nt7rsvHEbrOgLlwwCO1iU="}]},"scripts":{},"deprecated":"Not maintained anymore"},"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@node.ee"},{"name":"guileen","email":"guileen@gmail.com"}],"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","tarball":"https://registry.npmjs.org/highlight/-/highlight-0.2.1.tgz","integrity":"sha512-XY7jHu1L/LKaKyp2NAczaIXQGBMCw4U5r/HYZ1M2P+GQA8+Iu97i86Sk0Y9sxcXbteB06eRl+R/3VfGWVYCApw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmiMNeojPSfmGiBP7/QD2HpSLf6VBcQ5nhsDmPoBvfOAIgafZTIHRG52dUS1YsJTCKiFiLGM9IsmAcYdYYB0wqR8E="}]},"deprecated":"Not maintained anymore"},"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@node.ee"},{"name":"guileen","email":"guileen@gmail.com"}],"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","tarball":"https://registry.npmjs.org/highlight/-/highlight-0.2.2.tgz","integrity":"sha512-0T7ye7p+h77vt9OgFmFOlNW5icBsS8P7HgIMUhyZi9uTvFxA1fcbts10JN6osVyhUq3DkgzGy1CQGXLV1btf9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1HGdnbXl31Cnf8U2fcvAaFEWrxXMP8SxmhX9Ezr1ijAiAVPY+oMRT3F+E7oyhDX6xBPhy+8RWHfhiu+Qq4izHQLQ=="}]},"deprecated":"Not maintained anymore"},"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@node.ee"},{"name":"guileen","email":"guileen@gmail.com"}],"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","tarball":"https://registry.npmjs.org/highlight/-/highlight-0.2.3.tgz","integrity":"sha512-/QB5+wMyvJgUbFeYOmjvefLQjxWM5+fntie8X/fQE+B8bIkKx7ywt63F3+5AAvnxhmypd94SYxVzAK7w6GH7zA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaFabN8dGDqJITCt0UYJd4iOM+lEkWeTpAGY02W1U5kQIgB/TxBxArRygjtw96X6o4Xzadk6B3IPmxokNXifaY5m4="}]},"deprecated":"Not maintained anymore"},"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@node.ee"},{"name":"guileen","email":"guileen@gmail.com"}],"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","tarball":"https://registry.npmjs.org/highlight/-/highlight-0.2.4.tgz","integrity":"sha512-TEcWU6BolpDYIaVD91KmaYe/kRZwOmQlLWZGO8DK+Cs555+7mawk2KUnF/dBwcLnrvlCDk/xC+BXfz7Zva+Jfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAkt1w0sZ0/Gqa7QcCGhtSJhvUbueo6WjJ9Ax6+DssP/AiA1pJhGSEOP5qNIVuxixZhbBWC8pasJZMqdK/+roxmovA=="}]},"deprecated":"Not maintained anymore"}},"maintainers":[{"name":"andris","email":"andris@node.ee"},{"name":"guileen","email":"guileen@gmail.com"}],"author":{"name":"Andris Reinman"},"repository":{"type":"git","url":"git+ssh://git@github.com/andris9/highlight.git"},"time":{"modified":"2022-06-18T20:43:13.695Z","created":"2011-06-03T10:03:21.833Z","0.1.0":"2011-06-03T10:03:21.834Z","0.2.0":"2011-07-11T08:57:39.296Z","0.2.1":"2012-01-22T20:26:04.296Z","0.2.2":"2012-04-13T07:27:37.956Z","0.2.3":"2012-08-14T06:46:55.593Z","0.2.4":"2015-09-11T12:52:11.884Z"},"users":{"fgribreau":true,"h4des":true,"subchen":true,"modao":true,"agat":true,"krickray":true,"po":true,"monjer":true},"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","readmeFilename":"README.md","homepage":"https://github.com/andris9/highlight#readme","bugs":{"url":"https://github.com/andris9/highlight/issues"}}