Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add virtual space nodes and improve linebreak positioning #1

Merged
merged 1 commit into from
Oct 7, 2019

Conversation

ikatyang
Copy link
Owner

@ikatyang ikatyang commented Oct 7, 2019

  • virtual spaces are spaces that were expanded from tabs
  • virutal spaces are represented in the syntax tree only if they should be rendered in the HTML output
  • the idea of virtual spaces is borrowed from micromark/common-markup-state-machine
  • linebreaks in indented code block, fenced code block, and html blocks are now more accurate so that we could grab their value contents more easily

- virtual spaces are spaces that were expanded from tabs
- virutal spaces are represented in the syntax tree only if they should be rendered in the HTML output
- the idea of virtual spaces is borrowed from [`micromark/common-markup-state-machine`](https://github.com/micromark/common-markup-state-machine#cvs)
- linebreaks in indented code block, fenced code block, and html blocks are now more accurate so that we could grab their value contents more easily
@ikatyang ikatyang merged commit 4742ce0 into master Oct 7, 2019
@ikatyang ikatyang deleted the feat/add-virtual-space branch October 7, 2019 14:41
@wooorm
Copy link

wooorm commented Oct 8, 2019

Nice, glad to hear my ideas are useful and not just theoretical! 👍

danielpunkass pushed a commit to danielpunkass/tree-sitter-markdown-ikatyang that referenced this pull request Oct 25, 2022
danielpunkass pushed a commit to danielpunkass/tree-sitter-markdown-ikatyang that referenced this pull request Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants