0.1.1 • Published 4 years ago
block-based-note-parser v0.1.1
Block-based Note Parser
Handling hierarchal blocks of text content. Using the unist syntax tree specification.
- This is a Block
- This is a child Block
- Here is a another block
with a multiple linesUsage
Use as a preprocessor like
import { parseBlocks } from "block-based-note-parser";
const content = "- My Note";
const result = parseBlocks(content);
console.log(result);Why?
Networked and block-based note taking applications like RoamResearch or LogSeq are on the rise. However, there is no easy library that you could use and integrate into custom applications. Therefore, this small library should help with parsing text into a block-based format.
Design
"Everything is a block"
Pre lines
- Blockwill get
- Pre lines
- BlockAnd
- Block
no intendwill get
- Block
no intendDevelopment
Run tests
yarn testRun tests in watch mode
yarn test:watchRelease with
yarn release