Skip to content

Commit

Permalink
Change option name to unique
Browse files Browse the repository at this point in the history
  • Loading branch information
qrac committed Mar 20, 2022
1 parent e8d47c9 commit 21c49e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const visitor = (preNode: hast.Element): void => {
const selector = (node: hast.Element): boolean => node.tagName === 'pre'


export interface Options {
export interface RehypePrismOptions {
plugins: (
'autolinker'| 'autoloader' | 'command-line' | 'copy-to-clipboard' |
'custom-class' | 'data-uri-highlight' | 'diff-highlight' |
Expand All @@ -56,7 +56,7 @@ export interface Options {
)[]
}

const rehypePrism: unifiedTypes.Plugin<[Options?]> = (options?: Options) => {
const rehypePrism: unifiedTypes.Plugin<[RehypePrismOptions?]> = (options?: RehypePrismOptions) => {
if (options && options.plugins) {
for (const plugin of options.plugins) {
require(`prismjs/plugins/line-numbers/prism-${plugin}`)
Expand Down

0 comments on commit 21c49e4

Please sign in to comment.