Giter Site home page Giter Site logo

Comments (5)

remcohaszing avatar remcohaszing commented on June 18, 2024 1

Thanks for raising this issue.

I’ve only tried this with xdm. Because of AST differences, this plugin doesn’t work with @mdx-js/loader@^1, but it might work with @mdx-js/loader@next.

Personally I recommend using xdm, but if you try it with @mdx-js/loader@next, I’m definitely curious about your experience!

I think the rehype plugins you’re using should just work with xdm as well.

from remark-mdx-code-meta.

deadcoder0904 avatar deadcoder0904 commented on June 18, 2024

I get another error:

./src/pages/tutorial/better-code-blocks/index.mdx
Unexpected character ! (U+0021) before name, expected a character that can start a name, such as a letter, $, or _ (note: to create a comment in MDX, use {/* text */})

from remark-mdx-code-meta.

remcohaszing avatar remcohaszing commented on June 18, 2024

Is that when using @mdx-js/loader@next or when using xdm?

Also are you sure your document doesn’t contain any syntax errors? It may help if you share the content of ./src/pages/tutorial/better-code-blocks/index.mdx. You can share markdown code blocks by using four backticks.

````md
```js filename="example.js"
console.log('Hello')
```
````

If you’re using @mdx-js/loader@next I’m afraid I can’t help you any further. :(

from remark-mdx-code-meta.

deadcoder0904 avatar deadcoder0904 commented on June 18, 2024

Is that when using @mdx-js/loader@next or when using xdm?

@mdx-js/loader@next

Also are you sure your document doesn’t contain any syntax errors?

Nope. It works fine. This is the link if you want to take a look → https://github.com/deadcoder0904/better-code-blocks/blob/main/src/pages/tutorial/better-code-blocks/index.mdx

You can share markdown code blocks by using four backticks.

Yeah, I recently learnt that while pasting MDX Code Block on Github & Reddit.

If you’re using @mdx-js/loader@next I’m afraid I can’t help you any further. :(

No problem, I solved it using rehype plugin. But you should probably mention that it requires XDM :)

from remark-mdx-code-meta.

remcohaszing avatar remcohaszing commented on June 18, 2024

I’m closing this issue as it works with mdx-js/mdx.

from remark-mdx-code-meta.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.