Skip to content

Commit

Permalink
[minor fix] fixes js not being accepted
Browse files Browse the repository at this point in the history
* adds `md` alias
  • Loading branch information
dscape committed Dec 12, 2012
1 parent 9f1e15d commit f18ee61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/blacksmith/common.js
Expand Up @@ -31,12 +31,15 @@ common.extensions = {
// Available highlight languages // Available highlight languages
// //
common.availableLanguages = Object.keys(hljs.LANGUAGES); common.availableLanguages = Object.keys(hljs.LANGUAGES);

common.availableLanguages.push('js');
common.availableLanguages.push('md');
// //
// Default settings for `marked`. // Default settings for `marked`.
// TODO: Make this configurable. // TODO: Make this configurable.
// //
hljs.LANGUAGES.js = hljs.LANGUAGES.javascript; hljs.LANGUAGES.js = hljs.LANGUAGES.javascript;
hljs.LANGUAGES.md = hljs.LANGUAGES.markdown;

common.marked = { common.marked = {
gfm: true, gfm: true,
pedantic: false, pedantic: false,
Expand Down
2 changes: 1 addition & 1 deletion test/common-test.js
Expand Up @@ -67,7 +67,7 @@ vows.describe('blacksmith/common').addBatch({
"with `md` language": { "with `md` language": {
topic: function () { topic: function () {
try { try {
var code = common.marked.highlight('# Test', 'md'); var code = common.marked.highlight('# Test', 'mdown');
this.callback(null, code); this.callback(null, code);
} }
catch (exc) { catch (exc) {
Expand Down

0 comments on commit f18ee61

Please sign in to comment.