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

[feature] lossless transformer #99

Open
gera2ld opened this issue Jan 5, 2022 · 0 comments
Open

[feature] lossless transformer #99

gera2ld opened this issue Jan 5, 2022 · 0 comments

Comments

@gera2ld
Copy link
Member

gera2ld commented Jan 5, 2022

Parse Markdown to a lossless node tree, inserting empty nodes where needed to keep all hierarchical information.

Input:

p0

### h0.1

p1

## h1

p2

- l1
- l2

p3

```
code block
```

### h1.1

p4

Output:

- <empty>
  - <empty>
    - p0
  - h0.1
    - p1
- h1
  - <empty>
    - p2
    - ul
      - l1
      - l2
    - p3
    - code block
  - h1.1
    - p4

Pros:

  • there will be no more confusion with subheadings and other nodes of the same parents (e.g. paragraph before a subheading, p2 and h1.1 in the example above).
  • add possibility to edit content on the tree and reflect to the Markdown
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

No branches or pull requests

1 participant