Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shiki transformer this.addClassToHast is not a function in astro #673

Open
3 tasks done
blackPeppper opened this issue May 10, 2024 · 3 comments
Open
3 tasks done

Comments

@blackPeppper
Copy link

blackPeppper commented May 10, 2024

Validations

Describe the bug

shiki transformer this.addClassToHast is not a function in astro

Astro v4.6.2
Node v20.11.1
System Windows (x64)
Package Manager pnpm
Output static
Adapter none
Integrations auto-import
@astrojs/mdx
@astrojs/sitemap
astro-compress
astro-purgecss
@vite-pwa/astro-integration
astro-meta-tags
astro-icon
astro-compressor

```tsx
console.log("Introduction.")

console.log("Subtraction.") // [!code focus] // [!code --]

console.log("Addition.") // [!code focus] // [!code ++]

console.log("In focus.") // [!code focus]

console.log("End.")


```js
   // astro.config 
    mdx({
      optimize: true,
      shikiConfig: {
        experimentalThemes: {
          light: "material-theme-lighter",
          dark: "material-theme-darker",
        },
        transformers: [
          transformerNotationDiff(),
          transformerNotationFocus(),
          transformerMetaHighlight(),
          transformerNotationWordHighlight(),
          transformerNotationErrorLevel(),
          transformerRenderWhitespace(),
          transformerMetaWordHighlight(),
          transformerCompactLineOptions(),
          transformerRemoveLineBreak()
        ],
      },
    }),
    ```


### Reproduction

https://github.com/spices-solutions/fruitUI/tree/upgrade-shinki

### Contributes

- [ ] I am willing to submit a PR to fix this issue
- [ ] I am willing to submit a PR with failing tests
@blackPeppper
Copy link
Author

@antfu
Copy link
Member

antfu commented May 10, 2024

This is not a minimal reproduction, please provide a minimal one. Thanks

@blackPeppper
Copy link
Author

blackPeppper commented May 11, 2024

Sorry for the noise just needed to upgrade to astro ->4,8 that fixes the problem

so where I can get these styles
https://github.com/blackPeppper/shiki-min-trans-pord

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants