Giter Site home page Giter Site logo

remark-code-snippets's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

remark-code-snippets's Issues

Can't include more than one code block from the same file

Thanks for the plugin. It's very useful. Not sure if you're still maintaining it, but when I try to import two or more sections of code from the same file I get an error. This is from two different code blocks (and different marker names). For example:

```typescript file=./packages/login/src/types.ts start=start_mdx_hook end=end_mdx_hook
```

```typescript file=./packages/login/src/types.ts start=start_mdx_hook2 end=end_mdx_hook2
```
results in the error:

Error: MDX compilation failed for file "/home/jg/www/npm-library/shared/docs/docs/components/login.mdx"
Cause: Ambiguous code block start marker. Found more than once in ./shared/common/src/types.ts, at lines 27,50
Details:
Error: Ambiguous code block start marker. Found more than once in ./shared/common/src/types.ts, at lines 27,50
at getSnippet (/home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/remark-code-snippets/dist/index.js:81:19)
at transformer (/home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/remark-code-snippets/dist/index.js:62:30)
at wrapped (file:///home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:115:27)
at next (file:///home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:65:23)
at done (file:///home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:148:7)
at then (file:///home/jg/www/npm-library/node_modules/.pnpm/[email protected]/node_modules/trough/index.js:158:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.mdxLoader (/home/jg/www/npm-library/node_modules/.pnpm/@Docusaurus+mdx-loader@3.1.0_@docusaurus[email protected][email protected][email protected][email protected]/node_modules/@docusaurus/mdx-loader/lib/loader.js:130:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

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.