Skip to content

Commit

Permalink
Merge pull request #679 from philj0st/patch-1
Browse files Browse the repository at this point in the history
Improve code_highlight configuration options type to be Partial
  • Loading branch information
oscarotero authored Oct 23, 2024
2 parents 9fa30af + 2a7c71e commit e3a68e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/code_highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Options {
* Options passed to highlight.js.
* @see https://highlightjs.readthedocs.io/en/latest/api.html#configure
*/
options?: Omit<HLJSOptions, "__emitter">;
options?: Partial<Omit<HLJSOptions, "__emitter">>;

/**
* The theme or themes to download
Expand Down Expand Up @@ -83,7 +83,7 @@ export function codeHighlight(userOptions?: Options) {
function processCodeHighlight(pages: Page[]) {
for (const page of pages) {
page.document!.querySelectorAll<HTMLElement>(
options.options.cssSelector,
options.options.cssSelector!,
)
.forEach((element) => {
try {
Expand Down

0 comments on commit e3a68e7

Please sign in to comment.