Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed languages.json #183

Merged
merged 1 commit into from Mar 27, 2013

Conversation

Projects
None yet
2 participants
Contributor

neocotic commented Mar 27, 2013

I've removed a few unsupported languages from languages.json and renamed some other languages. In summary;

Removed Languages

  • c
  • gherkin
  • livescript
  • make
  • sass
  • scheme
  • yaml

Renamed Languages

  • c# -> cs
  • objc -> objectivec

As the current languages are not support by highlight.js, attempting to run docco against any of the matching files (or by specifying the language explicitly) was resulting in the following error:

[neocotic docco]$ ./bin/docco ~/example.ls

/home/neocotic/dev/docco/node_modules/highlight.js/highlight.js:142
      if (mode.compiled)                                          
              ^                                                   
TypeError: Cannot read property 'compiled' of undefined           
    at compileMode (/home/neocotic/dev/docco/node_modules/highlight.js/highlight.js:142:15)
    at compileLanguage (/home/neocotic/dev/docco/node_modules/highlight.js/highlight.js:213:5)
    at highlight (/home/neocotic/dev/docco/node_modules/highlight.js/highlight.js:362:5)      
    at format (/home/neocotic/dev/docco/docco.js:96:14)                                       
    at /home/neocotic/dev/docco/docco.js:35:11                                                
    at fs.js:266:14                                                                          
    at Object.oncomplete (fs.js:107:15)

@jashkenas jashkenas added a commit that referenced this pull request Mar 27, 2013

@jashkenas jashkenas Merge pull request #183 from neocotic/fix-languages
Fixed languages.json
3b763da

@jashkenas jashkenas merged commit 3b763da into jashkenas:master Mar 27, 2013

Owner

jashkenas commented Mar 27, 2013

Thanks for doing the research.

@neocotic neocotic deleted the neocotic:fix-languages branch Mar 27, 2013

Contributor

neocotic commented Mar 27, 2013

No problem! Thanks for making docco 😉

Contributor

neocotic commented Mar 27, 2013

@jashkenas Would you have any objection to me adding all languages supported by highlight.js to languages.json.

Obviously, I would only add languages that supported inline comments with leading characters. For example; css and xml-based languages would be excluded as they use /* ... */ and <!-- ... --> respectively. Support these, potentially multi-line, comments would be a much bigger change and not something I wish to do.

Additionally, I'm not sure how much benefit languages like java would gain from docco support, as JavaDoc comments are obviously favoured over single-line comments, but maybe the option wouldn't hurt.

Owner

jashkenas commented Mar 27, 2013

Go for it.

This was referenced Mar 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment