{"id":30180934,"url":"https://github.com/streamich/md-jml","last_synced_at":"2025-08-12T08:06:21.714Z","repository":{"id":57293213,"uuid":"62664609","full_name":"streamich/md-jml","owner":"streamich","description":"Markdown to JsonML parser in JavaScript","archived":false,"fork":false,"pushed_at":"2018-01-05T09:31:38.000Z","size":30,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T10:43:45.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/streamich.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}},"created_at":"2016-07-05T19:43:09.000Z","updated_at":"2018-03-25T06:03:49.000Z","dependencies_parsed_at":"2022-09-01T06:40:33.082Z","dependency_job_id":null,"html_url":"https://github.com/streamich/md-jml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/streamich/md-jml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fmd-jml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fmd-jml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fmd-jml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fmd-jml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/md-jml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fmd-jml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269743312,"owners_count":24468493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-12T08:06:09.550Z","updated_at":"2025-08-12T08:06:21.699Z","avatar_url":"https://github.com/streamich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `md-jml`\r\n\r\nMarkdown to JsonML parser. This is a port of [`marked`](https://github.com/chjj/marked) to TypeScript.\r\n\r\nDifferences:\r\n\r\n - Outputs JsonML AST instead of an HTML string.\r\n - Written in TypeScript.\r\n - Does not support highlighting functionality of `marked`, as it is better\r\n to do it by extending the `Ast` constructor function (a.k.a. `Renderer` in `marked`) or\r\n by traversing the resulting JsonML tree.\r\n - Asynchronous AST generation.\r\n - Not tested.\r\n \r\nUnlike other Markdown parsers this module returns a JsonML AST of the resulting\r\nHTML instead of just an HTML string.\r\n\r\nYou can use that JsonML to easily concatenate it to an HTML string or\r\nfeed the JsonML to a virtual DOM rendering engine, like `React.js`, `Mithril.js`, `virtual-dom`, etc...\r\n\r\nUsing `marked` you get an HTML string:\r\n\r\n```js\r\nvar marked = require('marked');\r\nconsole.log(marked('I am using __markdown__.'));\r\n// \u003cp\u003eI am using \u003cstrong\u003emarkdown\u003c/strong\u003e.\u003c/p\u003e\r\n```\r\n\r\nHowever, `md-jml` returns a JsonML tree:\r\n\r\n```js\r\nvar md = require('md-jml');\r\nmd.parse('I am using __markdown__.', {}, function(jml) {\r\n    console.log(jml);\r\n});\r\n\r\n// [ 'div',\r\n//     [ 'p', null,\r\n//         'I am using ',\r\n//         [ 'strong', null, 'markdown' ],\r\n//         '.'\r\n//     ]\r\n// ]\r\n```\r\n\r\nYou can use the resulting JsonML to generate HTML using the [`jml-h`](http://www.npmjs.com/package/jml-h) package:\r\n\r\n```js\r\nvar jmlh = require('jml-h');\r\nvar html = jmlh.dom(jml);\r\nconsole.log(html);\r\n// \u003cdiv\u003e\u003cp\u003eI am using \u003cstrong\u003emarkdown\u003c/strong\u003e.\u003c/p\u003e\u003c/div\u003e\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fmd-jml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Fmd-jml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fmd-jml/lists"}