block-based-note-parser
v0.1.1
Published
Parser for block-based notes.
Downloads
8
Readme
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 lines
Usage
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
- Block
will get
- Pre lines
- Block
And
- Block
no intend
will get
- Block
no intend
Development
Run tests
yarn test
Run tests in watch mode
yarn test:watch
Release with
yarn release