https://github.com/pedrofnseca/html-transpiler-markdown
Html transpiler to Markdown in C
https://github.com/pedrofnseca/html-transpiler-markdown
c file-manager html markdown translate transpiler
Last synced: 4 months ago
JSON representation
Html transpiler to Markdown in C
- Host: GitHub
- URL: https://github.com/pedrofnseca/html-transpiler-markdown
- Owner: PedroFnseca
- Created: 2024-10-19T00:09:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-30T23:45:41.000Z (over 1 year ago)
- Last Synced: 2025-04-03T23:23:29.909Z (over 1 year ago)
- Topics: c, file-manager, html, markdown, translate, transpiler
- Language: C
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## HTML Transpiler to Markdown in C
> This project aims to study how to create a transpiler that will take an `.html` file and transform it into a `.md` file.
## Concepts used
### **Stack** (Data Structure)
In this project, the `stack` data structure was used to store the exact order of tags that were opened, so they can be closed in the correct order to generate the `.md` file correctly.
---
## State Machine (Read)
| Current State | Next State |
|-----------------|------------------|
| INIT | READ_TAG |
| READ_TAG | READ_CONTENT |
| READ_TAG | CHECK_CLOSE_BAR |
| READ_CONTENT | READ_TAG |
| CHECK_CLOSE_BAR | INIT |
| CHECK_CLOSE_BAR | READ_TAG |
| CHECK_TAG | CHECK_TITLE |
| CHECK_TAG | CHECK_CLOSE_OPEN |
| CHECK_TITLE | READ_CONTENT |
| CHECK_CLOSE_OPEN| READ_CONTENT |
| CHECK_CONTENT | READ_TAG |
| CHECK_CONTENT | CHECK_CONTENT |
| CHECK_TAG_END | INIT |
## State Machine (Write)
| Current State | Next State |
|---------------|------------|
| NONE | TAG |
| TAG | CONTENT |
| CONTENT | TAG |
| CONTENT | NONE |
Under construction ...