jknoxville / remark-code-snippets Goto Github PK
View Code? Open in Web Editor NEWRemark plugin for importing snippets of source files, as code blocks
License: MIT License
Remark plugin for importing snippets of source files, as code blocks
License: MIT License
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.