Skip to content

Commit

Permalink
fix: fix allowed keys in sanitizeMetaPojo
Browse files Browse the repository at this point in the history
  • Loading branch information
norskeld committed Jan 10, 2022
1 parent 424188d commit e49efb5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/shikigami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,9 @@ function extractMeta(source: string, { openToken, closeToken }: ExtractMetaOptio
}

function sanitizeMetaPojo(metaPojo: MetaPojo): MetaPojo {
const ALLOWED_KEYS = [
'withLanguage',
'withLineNumbers',
'highlight',
'highlightClasses',
'highlightRangeClasses'
].map((key) => key.toLowerCase())
const ALLOWED_KEYS = ['withLanguage', 'withLineNumbers', 'highlight', 'highlightInvert'].map(
(key) => key.toLowerCase()
)

return Object.entries(metaPojo)
.filter(([key]) => ALLOWED_KEYS.includes(key.toLowerCase()))
Expand Down

0 comments on commit e49efb5

Please sign in to comment.