{"id":47774197,"url":"https://github.com/meugenom/markdown-ts-compiler","last_synced_at":"2026-04-03T11:01:29.369Z","repository":{"id":40304882,"uuid":"208392416","full_name":"meugenom/markdown-ts-compiler","owner":"meugenom","description":"Small Editor to parse markdown text to html, based on Typescript","archived":false,"fork":false,"pushed_at":"2026-03-19T11:02:58.000Z","size":6455,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-20T02:45:30.065Z","etag":null,"topics":["markdown","tailwindcss","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://meugenom.github.io/markdown-ts-compiler/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meugenom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-14T05:12:36.000Z","updated_at":"2026-03-19T11:03:03.000Z","dependencies_parsed_at":"2022-08-09T16:52:17.425Z","dependency_job_id":null,"html_url":"https://github.com/meugenom/markdown-ts-compiler","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/meugenom/markdown-ts-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fmarkdown-ts-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fmarkdown-ts-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fmarkdown-ts-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fmarkdown-ts-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meugenom","download_url":"https://codeload.github.com/meugenom/markdown-ts-compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fmarkdown-ts-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31347183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markdown","tailwindcss","typescript","webpack"],"created_at":"2026-04-03T11:01:27.927Z","updated_at":"2026-04-03T11:01:29.361Z","avatar_url":"https://github.com/meugenom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"                            _       _\n       _ __ ___   __ _ _ __| | ____| | _____      ___ __  \n      | '_ ` _ \\ / _` | '__| |/ / _` |/ _ \\ \\ /\\ / / '_ \\ \n      | | | | | | (_| | |  |   \u003c (_| | (_) \\ V  V /| | | |\n      |_| |_| |_|\\__,_|_|  |_|\\_\\__,_|\\___/ \\_/\\_/ |_| |_|\n\n                                      _ _       \n             ___ ___  _ __ ___  _ __ (_) | ___ _ __ \n            / __/ _ \\| '_ ` _ \\| '_ \\| | |/ _ \\ '__|\n           | (_| (_) | | | | | | |_) | | |  __/ |\n            \\___\\___/|_| |_| |_| .__/|_|_|\\___|_|\n                               |_|               \n\n## Markdown Typescript Compiler\n\n![Human Made](https://img.shields.io/badge/Hand--coded-100%25-orange)\n![No AI Generated Code](https://img.shields.io/badge/AI--Generated-None-green)\n\n![Version](https://img.shields.io/badge/version-0.5.0-blue.svg?style=for-the-badge)\n\n![TypeScript](https://img.shields.io/badge/typescript-%23007acc.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Webpack](https://img.shields.io/badge/webpack-%238DD6F9.svg?style=for-the-badge\u0026logo=webpack\u0026logoColor=black)\n![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge\u0026logo=tailwind-css\u0026logoColor=white)\n\n[DEMO](https://meugenom.github.io/markdown-ts-compiler/)\n\n## IMPORTANT!\n\n**The codebase for the Project is entirely hand-coded.**\nEvery line of code in the project was crafted by  a human developer.\nNO AI-generated Code was used in the development of this project.\nAI was strictly utilized only for architectural brainstorming and refining complex regular expression.\n\n## Core Architecture\n\n**Two-Pass parsing Strategy**\n1. Markdown Text -\u003e AST (Abstract Syntax Tree)\n    - **First-Pass:** The engine scans document to identify high-level structural blocks (e.g., caption, headers, lists, code blocks, tables) and generates a token stream.\n    - **Second-Pass:** (Recursive Inline Parsing) Content within blocks is processed through a recursive function. The engine handles deeply nested inline elements (e.g., links, images, bold text, underline text, formulas) with high precision.\n2. AST -\u003e HTML \n    - The final output is generated wia recursive tree-walk of the AST, ensuring that complex hierarchies are translated into valid, semantic HTML.\n\n## Testing\n\nThe Core AST generation logic is tested to parsing stability and regression prevention:\n- **70% Code Coverage** Focus is placed on critical structural components.\n- **Core Block Testing** High priority modules (tables, headers, lists, caption, paragraphs)\n\n![testing screenshot](./assets/testing_screenshot.png)\n\n## Technologies Used:\n\n- npm v10.8.2, node v20.20.0\n- Typescript v5.3.2\n- Webpack v5.105.3\n- TS-Loader v9.5.4\n- Tailwind CSS from [website](https://tailwindcss.com) v4.0.12\n- Shiki v.4.0.2\n- Katex v.0.16.33\n- Jest v.30.2.0\n\n## How to use it:\n\n1. Clone the repository:\n2. Install the dependencies:\n    ```bash\n    yarn\n    ```\n3. Run the compiler:\n    ```bash\n    yarn build\n    ```\n\n4. For testing use command:\n    ```bash\n    yarn test\n    ```\n\n## API Reference:\n Please see entrypoint `./src/index.ts` for the API reference.\n \n **API** functions:\n- _convertMDtoHTML(txt: string)_ - converts markdown text into HTML, return HTML string\n- _convertMDtoTokens(txt: string)_ - converts markdown text into tokens, return array of tokens\n- _convertMDtoAST(txt: string)_ - converts markdown text into AST, return Abstract Syntax Tree\n\n## How to use it in your project:\n\n**Directories:**\n- `./src` - the main compiler code:\n    - `../test` - the test code\n    - `../htmlblocks` - the html blocks to parse AST into HTML\n    - `../content` - the example text to parse\n    - `../static` - the static files index.html, css styles\n    - `../types` - integration with external libraries\n    \n- `/dist` - the compiled code and static files, need to run build command‚\n\n**Files:**\n- `./src/index.ts` - the entrypoint of the comiler\n- `./src/Grammar.ts` - the grammar with Regexp rules\n- `./src/Tokenizer.ts` - the tokenize class to make AST from MD text\n- `./src/Render.ts` - the compiler class to compile AST into HTML\n\n\n### Author:\n\n[meugenom](https://meugenom.com)\n\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge\u0026logo=opensourceinitiative\u0026logoColor=white)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeugenom%2Fmarkdown-ts-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeugenom%2Fmarkdown-ts-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeugenom%2Fmarkdown-ts-compiler/lists"}