Skip to content

Commit

Permalink
Merge pull request jashkenas#291 from cscott/patch-1
Browse files Browse the repository at this point in the history
docco.parse: Don't crash if config parameter is default value.
  • Loading branch information
keithamus committed Jul 1, 2014
2 parents 58101d3 + ceaff18 commit 0bf6750
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docco.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ file extension. Detect and tag "literate" `.ext.md` variants.

getLanguage = (source, config) ->
ext = config.extension or path.extname(source) or path.basename(source)
lang = config.languages[ext] or languages[ext]
lang = config.languages?[ext] or languages[ext]
if lang and lang.name is 'markdown'
codeExt = path.extname(path.basename(source, ext))
if codeExt and codeLang = languages[codeExt]
Expand Down

0 comments on commit 0bf6750

Please sign in to comment.