Skip to content

Commit

Permalink
feat: add text nodes (#3)
Browse files Browse the repository at this point in the history
- `text` nodes are now shown in the syntax tree
- `text` nodes include whitespace characters but not linebreak characters
- whitespace characters that are used for defining block structure are not part of `text` nodes
- `text` node positions are accurate so that we could grab their value contents easily
  • Loading branch information
ikatyang authored Oct 14, 2019
1 parent 39daf72 commit 8404102
Show file tree
Hide file tree
Showing 16 changed files with 24,929 additions and 20,278 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ console.log(tree.rootNode.toString());
// (document
// (atx_heading
// (atx_heading_marker)
// (heading_content))
// (heading_content
// (text)))
// (tight_list
// (list_item
// (list_marker)
// (indented_code_block)
// (paragraph))))
// (indented_code_block
// (text))
// (paragraph
// (text)))))
```

## License
Expand Down
Loading

0 comments on commit 8404102

Please sign in to comment.