Skip to content

Commit

Permalink
fix: calls transformer before interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
bent10 committed Nov 13, 2023
1 parent 729ca55 commit 18fe7b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/code-preview/src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ export function transform(token: Tokens.Generic, options: TransformOptions) {
token.lang = token.lang?.replace(ATTR_PATTERN, '')

// data for interpolation
const preview = transformer(token.text, attrs, data)
const dataInterpolation = {
...data,
...attrs,
preview: transformer(token.text, attrs, data)
preview
}

const acc: Array<Tokens.Code | Tokens.Generic | Tokens.HTML | Tokens.Space> =
Expand Down

0 comments on commit 18fe7b5

Please sign in to comment.