{"id":20032335,"url":"https://github.com/weakish/htm","last_synced_at":"2025-08-01T22:40:13.152Z","repository":{"id":146349699,"uuid":"534655735","full_name":"weakish/htm","owner":"weakish","description":"convert plain text to HTML 2.0, auto-linked","archived":false,"fork":false,"pushed_at":"2023-04-21T11:52:49.000Z","size":85840,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T18:12:01.920Z","etag":null,"topics":["html2"],"latest_commit_sha":null,"homepage":"https://htm.mmap.page","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weakish.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-09-09T13:32:26.000Z","updated_at":"2023-03-08T13:14:59.000Z","dependencies_parsed_at":"2023-08-21T07:46:43.445Z","dependency_job_id":null,"html_url":"https://github.com/weakish/htm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhtm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhtm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhtm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhtm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weakish","download_url":"https://codeload.github.com/weakish/htm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241463608,"owners_count":19967079,"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","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":["html2"],"created_at":"2024-11-13T09:36:41.730Z","updated_at":"2025-03-02T05:26:06.090Z","avatar_url":"https://github.com/weakish.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"htm - convert plain text to HTML 2.0, auto-linked.\n\nUsage\n\n    import htm from \"htm\"\n    const text = \"plain text\"\n    const html = htm(text)\n\nThe returned value is a string contaning valid [HTML 2.0].\nThe first line will be the TITLE and H1 heading.\nThe remaining part will be enclosed with a PRE element,\nwith links auto-linked.\n\nBesides HTML 2.0, ISO HTML and HTML5 are also supported.\nBelow is the type definition in TypeScript:\n\n    type htmlVariant = \"tags\" | \"html2\" | \"iso\" | \"html5\";\n    const html: (text: string, variant: htmlVariant) =\u003e string;\n\nIn fact, `htm(text)` is just a shortcut for `html(text, \"html2\")`.\n\nHTML 2.0 is the first standard of HTML, published in 1995.\nISO HTML, published as an ISO standard in 2000,\nis almost identical to HTML 4.01 Strict.\nHTML 4.01, published in 1999,\nis the most widely adopted standard in the first decade of the 21st century.\nHTML5 is the current recommendation by all mainstream web browsers.\n\nIt also supports generating HTML tags, the HTML language before 2.0,\nwhich was published in 1991 and is the first publicly available description of HTML.\nAuto-link is not supported when specifying this as the output format.\n\nAPI\n\nSee src/index.bs.d.ts\n\nAPIs not listed there are considered internal.\nChanges to internal APIs are not considered as breaking changes on releases.\n\nMarkdown Compatibility\n\nThe input is supposed to be plain text.\nHowever, the following Markdown syntax is supported:\n\n- If the first line starts with `# `, then the leading `# ` will be trimmed.\n\n- Inline links (brackets immediately followed with parentheses) will be converted to links,\n  without displaying the URL.\n\nContributing\n\nThe source code repository is at\n\nhttps://github.com/weakish/htm\n\nThis project is written in ReScript (src/index.res),\nwith tests written in TypeScript.\n\n\"dependencies\": {\n\"linkify-string\": \"auto link URLs and escape \u003c,\u003e,\u0026\"\n},\n\"devDependencies\": {\n\"c8\": \"coverage\",\n\"gentype\": \"generate TypeScript type definitions from ReScript\",\n\"husky\": \"manage git pre commits\",\n\"prettier\": \"code format\",\n\"pretty-quick\": \"code format pre-commit\",\n\"reanalyze\": \"analyze ReScript code for common problems\",\n\"tap\": \"test\"\n}\n\nLicense\n\n0BSD, excluding dependencies that have various licenses.\n\nReference\n\n- [HTML Tags](http://info.cern.ch/hypertext/WWW/MarkUp/Tags.html)\n- [Hypertext Markup Language - 2.0][html 2.0]\n- [RFC1866](https://datatracker.ietf.org/doc/html/rfc1866)\n- [ISO/IEC 15445:2000](https://www.scss.tcd.ie/misc/15445/15445.HTML)\n- [HTML Validator](https://validator.w3.org)\n\n[html 2.0]: https://www.w3.org/MarkUp/html-spec/html-spec_toc.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fhtm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakish%2Fhtm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fhtm/lists"}