-
Notifications
You must be signed in to change notification settings - Fork 18
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
Parse Markdown Strings to Json Object #16
Comments
@yonderbread , thanks for the suggestion. Could you please give more details about the string input usage? |
Yea of course, so instead of reading directly from a file object you could just pass an already read out file as a string to markdown-json and it would return the Object version of it. |
Same sentiment from me - I wasn't looking for a server/file processor - I just wanted a function that would convert a markdown string to a JSON structure. e.g.: const markdownJson = require('markdown-json')
const fs = require('fs')
const markdown = fs.readFileSync('README.md', 'utf8')
const json = markdownJson.parse(markdown)
console.log(json) |
Yup. That's what I remember wanting to do as well. If I find some time I will try to implement this into the library. |
maybe this is solution to not convert markdown to html
|
Gonna try to test some things out. Feel free to open a pull request on my fork. |
not
but
Reference your file at line 123 reinstall with git clone https://github.com/klaytonfaria/markdown-json.git
cd markdown-json
npm install
edit lib/generator.js
node markdown-json |
Instead of reading in files, would I be able to parse some strings with this and convert them to objects?
The text was updated successfully, but these errors were encountered: