docco icon indicating copy to clipboard operation
docco copied to clipboard

Pass options to Marked?

Open PunkChameleon opened this issue 11 years ago • 3 comments

Hey all,

I'm running into an issue where I have to pass { highlight : null } into Marked from docco. Is there a way to do this easily without having to customize the docco code?

This is related to DavidSouther/grunt-docco#34.

PunkChameleon avatar Jan 09 '14 15:01 PunkChameleon

Result of my initial investigation:

This could have something to do with docco's reference of some highlight.js internals. The dependency is of highlight.js for docco is >= 7.3.0 which would mean 8.0.0 which breaks some of these cases could be used by npm. Docco expects highlightjs.LANGUAGES to exist but, in v8, it doesn't.

You should probably raise a bug with docco or pull request to have this dependency changed to ~7.3.0 which would include 7.5.0 but not 8.0.0. I'm not saying this alone will solve this issue but it could be it.

Could you check the package.json file of highlight.js dependency within the docco directory under node_modules to see what version you have?

This is the most likely due to today's release of highlight.js v8 which changes the API. LANGUAGES no longer exists and is replaced by a getLanguage function on the API.

I believe that this will break all new installations of docco.

neocotic avatar Jan 09 '14 15:01 neocotic

Fix included in #258

PunkChameleon avatar Jan 09 '14 15:01 PunkChameleon

@streetlight Is this still an issue for you or shall I close it?

keithamus avatar Apr 11 '14 22:04 keithamus