Skip to content

Commit

Permalink
Merge pull request jashkenas#1 from searls/master
Browse files Browse the repository at this point in the history
Switches to the official Highlight.js module
  • Loading branch information
jashkenas committed Mar 17, 2013
2 parents eaefe05 + 379c34f commit bbe216e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions journo.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ We syntax-highlight blocks of code with the nifty **highlight** package that
includes heuristics for auto-language detection, so you don't have to specify
what you're coding in.

{Highlight} = require 'highlight'
highlight = require 'highlight.js'
marked.setOptions
highlight: (code, lang) ->
Highlight code
if highlight.LANGUAGES[lang]?
highlight.highlight(lang, code, true).value
else
highlight.highlightAuto(code).value
Publish a Feed
--------------
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"underscore": ">= 1.4.3",
"marked": ">= 0.2.6",
"mime": ">= 1.2.7",
"highlight": ">= 0.2.3",
"highlight.js": ">= 7.3.0",
"rss": ">= 0.0.4"
},
"devDependencies": {},
Expand Down

0 comments on commit bbe216e

Please sign in to comment.