Skip to content

Commit

Permalink
fix: properly resolve path to highlight.js stylesheets
Browse files Browse the repository at this point in the history
This fixes an issue with hightlight.js stylesheet paths not being
resolved properly if this packages is used as a dev dependency in
another package.

Fixes #21.
  • Loading branch information
simonhaenisch committed Nov 27, 2018
1 parent 1c0a369 commit 64b0390
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ async function main(args, config) {
}

const highlightStylesheet = path.resolve(
__dirname,
'node_modules',
'highlight.js',
path.dirname(require.resolve('highlight.js')),
'..',
'styles',
`${config.highlight_style}.css`,
);
Expand Down

0 comments on commit 64b0390

Please sign in to comment.