Skip to content

Commit

Permalink
Update Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Feb 19, 2024
1 parent e27bfcb commit 209b390
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
## v0.1.x (current working branch)

- Fix html/url escaping
- Fix code block highlighting by lines
- Add `mdToJSON` function to parse markdown to JSON (#4)
```js
const traverse = (node) => {
// text node
if (typeof node === "string") {
console.log(node);
return;
}

// element type
console.log(node.type);

// element attributes (may be undefined)
console.log(node.props);

// element children (may be undefined)
node.children?.forEach(traverse);
};

const tree = mdToJSON("Stay _foolish_, stay **hungry**!");
traverse(tree);
```
## v0.1.0
Expand Down

0 comments on commit 209b390

Please sign in to comment.