{"repo":"cristianvasquez/docs-and-graphs","free":true,"listed":false,"github":"https://github.com/cristianvasquez/docs-and-graphs","clone":"git clone https://github.com/cristianvasquez/docs-and-graphs.git","description":"Parse markdown into a simplified Abstract Syntax tree","language":"JavaScript","stars":15,"topics":["markdown","markdown-parser","obsidian","tana","logsseq"],"license":"MIT","category":"docs-static-sites","readme_excerpt":"docs-and-graphs This lib parses markdown into a simplified Abstract Syntax tree. Why? Several Note-Taking apps are 'node-based,' 'markdown based,' etc. I use Markdown, and I cannot get used to outlines. However, I recognize the benefits of having node-based systems, where you can reference a specific node from any other node. So my question was: How can I have these nodes, and still use Markdown? After considering this, I realized that Markdown has some structure. It has headers that can be inside other headings and lists that can be inside other lists. These are the nodes this library generates. Usage Say you have the following markdown The lib will produce the following Json Options normalize (default: false ) When true , removes prefixes from parsed elements: - Tags: #tag becomes tag - Block IDs: ^block-id becomes block-id - Also applies text normalization (trimming, etc.) inlineAsArray (default: false ) Controls how inline fields like subject :: inline :: field are parsed: - false : Creates nested objects {subject: {inline: \"field\"}} - true : Returns arrays [\"subject\", \"inline\", \"field\"] includePosition (default: false ) When true , includes source position metadata (line/column numbers) from the markdown parser. Useful for debugging or source mapping. maxDepth (default: null ) Limits header nesting depth by flattening deeper headers: - null : No limit (default behavior) - 2 : Headers deeper than level 2 become level 2 siblings - Content and inline fields stay with their ","default_branch":null,"files":null,"tree":[],"storefront":"/r/cristianvasquez","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cristianvasquez/docs-and-graphs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}