Skip to content

Commit

Permalink
Revert "Change option name to unique"
Browse files Browse the repository at this point in the history
This reverts commit b49cce3.
  • Loading branch information
Val-istar-Guo authored Mar 20, 2022
1 parent b49cce3 commit 6df12cb
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 RehypePrismOptions {
export interface Options {
plugins: (
'autolinker'| 'autoloader' | 'command-line' | 'copy-to-clipboard' |
'custom-class' | 'data-uri-highlight' | 'diff-highlight' |
Expand All @@ -56,7 +56,7 @@ export interface RehypePrismOptions {
)[]
}

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

0 comments on commit 6df12cb

Please sign in to comment.