Skip to content

Commit

Permalink
feat: treat plain as plain text, close #24
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 2, 2023
1 parent 589bf02 commit 6ae612d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shikiji/src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { MaybeArray } from '../types'

export function isPlaintext(lang: string | null | undefined) {
return !lang || ['plaintext', 'txt', 'text'].includes(lang)
return !lang || ['plaintext', 'txt', 'text', 'plain'].includes(lang)
}

export function toArray<T>(x: MaybeArray<T>): T[] {
Expand Down

0 comments on commit 6ae612d

Please sign in to comment.