Closed chenxsan closed 7 years ago
Since browser side highlight is not supported, and the default highlightSyntax is set to true, I just ran into this error easily:
highlightSyntax
The problem is at https://github.com/npm/marky-markdown/blob/master/lib/render.js#L66 where highlighter is undefined because it's only require when typeof process.browser === 'undefined'.
highlighter
undefined
require
typeof process.browser === 'undefined'
This pull request should hopefully fix it.
Since browser side highlight is not supported, and the default
highlightSyntax
is set to true, I just ran into this error easily:The problem is at https://github.com/npm/marky-markdown/blob/master/lib/render.js#L66 where
highlighter
isundefined
because it's onlyrequire
whentypeof process.browser === 'undefined'
.This pull request should hopefully fix it.