Comments (4)
Ok, I think I have a better solution. Try this: "markdown-toc-unlazy" https://www.npmjs.com/package/markdown-toc-unlazy
And if you don't need to work with cli
you can delete the file cli.js
and in the libs/utils.js
file remove this line at the start:
var concat = require('concat-stream');
.
Hope this helped you!
from markdown-toc.
Any update on this?
I'm having the same error when importing the library in an Angular 14 application...
from markdown-toc.
I don't believe there will be, there are > 50 open issues and no update in the last 5 years.
from markdown-toc.
This fixed the problem but maybe you have to mess with dependencies...
Copy the library and put it in another folder to edit the source of it, then remove this:
var fn = require;
require = utils;
And replace all the require(..., ...)
with utils(..., ...)
like this:
utils('concat-stream', 'concat');
utils('gray-matter', 'matter');
utils('list-item', 'li');
utils('markdown-link', 'mdlink');
utils('minimist');
utils('mixin-deep', 'merge');
utils('object.pick', 'pick');
utils('remarkable', 'Remarkable');
utils('repeat-string', 'repeat');
utils('strip-color');
Hope it helps!
from markdown-toc.
Related Issues (20)
- Ignore existing heading anchor
- --no-firsth1 option causes "undefined" words to appear in the toc HOT 3
- wrong output and slug generated (using GFM as reference) when title contains a link
- inline code is stripped, even with --no-stripHeadingTags
- Invalid links
- -- the maxdepth parameter does not work on my Mac notebook
- Proposal: Add more detailed usage for toc.insert
- Generated ToC includes commented headers
- Unable to report version
- Extra newlines added when file has horizontal lines
- How do you add the anchors to the headings?
- Not working with esbuild/vite HOT 1
- cli option no-firsth1 naming is misleading
- Where is the generated toc HOT 1
- error in create-react-app
- Image for sponsorships
- want to help maintain markdown-toc? HOT 2
- Document with literal `---` or single horizontal rule at top is mangled
- Strange OpenGL output in place of toc? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown-toc.