{"_id":"@benwis/femark","_rev":"9-a1a710b7463f711e35dc5f1dbc6a5965","time":{"created":"2022-06-21T02:27:45.802Z","0.0.1":"2022-06-16T03:51:25.306Z","modified":"2022-07-15T17:34:20.060Z","0.0.2":"2022-06-16T03:54:26.848Z","0.0.3":"2022-06-16T04:06:26.489Z","0.0.4":"2022-06-16T04:53:53.134Z","0.0.6":"2022-06-16T04:57:59.791Z","0.1.0":"2022-06-21T02:27:46.088Z","0.1.1":"2022-06-21T18:29:08.333Z","0.1.2":"2022-07-15T17:34:19.987Z"},"name":"@benwis/femark","dist-tags":{"next":"0.1.1","latest":"0.1.2"},"versions":{"0.1.0":{"name":"@benwis/femark","version":"0.1.0","main":"index.js","types":"index.d.ts","napi":{"name":"femark","triples":{}},"license":"MIT","devDependencies":{"@napi-rs/cli":"^2.9.0","ava":"^4.2.0"},"engines":{"node":">= 10"},"scripts":{"artifacts":"napi artifacts","build":"napi build --platform --release","build:debug":"napi build --platform","prepublishOnly":"napi prepublish -t npm","test":"ava","version":"napi version"},"optionalDependencies":{"@benwis/femark-win32-x64-msvc":"0.1.0","@benwis/femark-darwin-x64":"0.1.0","@benwis/femark-linux-x64-gnu":"0.1.0"},"gitHead":"6ee23f3a037faf70b5e16761085335a5fe05dd34","description":"A markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP","dependencies":{"@benwis/femark-win32-x64-msvc":"0.1.0","@benwis/femark-darwin-x64":"0.1.0","@benwis/femark-linux-x64-gnu":"0.1.0"},"_id":"@benwis/femark@0.1.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Gik1END9Ij0x6v1es/VSwENuqSnnJgfZProddBpAwBFDt0YVCdI0wBgUsVtS2feJMaScTtRvN2sqrjB4Dc6oNg==","shasum":"defbcb0d4e5f4832c0ecdd0525bcd0aefbb9754a","tarball":"https://registry.npmjs.org/@benwis/femark/-/femark-0.1.0.tgz","fileCount":10,"unpackedSize":41334,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAb4OygBmnPhNLRNal5OdMU+BevGhk+bSZQPcv1wEK9AiEA3T7MnSl+kQv9UMRZmuQpOdB0zMmlbQUOdO4QrcrbH6I="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisSyiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVtA//dW4Sa3biFDuyuW3cty/QUVg2AUWVnzGVuw4IMaZ4523gorPj\r\nHsY2cPBl8c+JPV8rDWCGOOSpRZpiF4GYYd3a7CBuHZCi08H9YOik6J24UbZm\r\nnF0ynII3Q4IMrzFX5eiM0A9k53lim/Pyxa6K3PKEBoDO4lJnQ/pAc1+ua96O\r\nKBLvv8J953jhsaSoUmKxjPJgkwl2q9CxVCZCegdKCV3NdOTmgAo71da6QGHo\r\naXV/xsh+0od5zboNTxOiztW+Ku6A2uKJmjS6McfMgIlWDKtAuQRuJuA7cSqx\r\nRjD7aEYKERsa3cdP9Q04khXJigPhKvSLMZcmjAOIF9PRomHtfi3u9yALqJhg\r\nizp+fJCShMhL0/xDBcOhQdtCh6+DeJtoGfqXJIq0vBPnHRdzATLl0+yZ9ud6\r\n1fbNrncmhYMwr4m4zrPyGa35NOq+Sv5gRyrlOsZg5kqz2LVVJyyvnKp11dok\r\nxJgKnELcYS0sl9fsSmx7b81ChyzZpGo87V+UlwuThYxiRzn7+j1xIduw7XoJ\r\neYLsftIBELmNFg7d4xMgXo+jvZeEIQvH6bFBWUr6DQlJZm+szxBA9xobENxr\r\nIOtQoNMwFHNhnkzQW275aczqEVjnwv/22VrVAqOUFz+57PC76tTh1tTiavWX\r\n9aqnbXwMTut+AgLaDRWxwYpA4CKbMMeM2U4=\r\n=2Bj5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"benwis","email":"benwis@protonmail.com"},"directories":{},"maintainers":[{"name":"benwis","email":"benwis@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/femark_0.1.0_1655778465878_0.27737836572769403"},"_hasShrinkwrap":false},"0.1.1":{"name":"@benwis/femark","version":"0.1.1","main":"index.js","types":"index.d.ts","napi":{"name":"femark","triples":{}},"license":"MIT","devDependencies":{"@napi-rs/cli":"^2.9.0","ava":"^4.2.0"},"engines":{"node":">= 10"},"scripts":{"artifacts":"napi artifacts","build":"napi build --platform --release","build:debug":"napi build --platform","prepublishOnly":"napi prepublish -t npm","test":"ava","version":"napi version"},"optionalDependencies":{"@benwis/femark-win32-x64-msvc":"0.1.1","@benwis/femark-darwin-x64":"0.1.1","@benwis/femark-linux-x64-gnu":"0.1.1"},"readme":"# femark\n\nA blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP\n\n## Install\n\n```sh\nnpm i @benwis/femark\n```\n\n## Use\nThe package exposes one function that will process your markdown and compile it to HTML. It will also generate a table of contents for you with your heading tags and their respective level. If you have no headings, toc should be undefined, but if there is an error parsing your markdown, it will throw an error.\n\nIt is recomended to run this on the server side, since it has a fairly large package size. If you are using Remix, I recommend you use this in your loaders or actions.\n\n```ts\n let {content, toc} = processMarkdownToHtml('# Hello, World!');\n```\n\n## Supported Languages\n\n- Rust\n- Typescript\n- Tsx\n- Javascript\n- Jsx\n- Dockerfile\n- Python\n- Go\n- C\n- HTML\n- TOML\n- JSON\n\nCurrently the supported languages are driven mostly by my needs, but I am open to PRs to add additional language support if they are popular. \n\n## Theme\n\nBy default, this package does not style your code blocks, merely decorates the elements with classes that range from `hh0` to `hh20`. The indices refer to the elements in this list:\n```rust\nlet highlight_names = [\n      \"attribute\",\n      \"constant\",\n      \"function.builtin\",\n      \"function\",\n      \"keyword\",\n      \"operator\",\n      \"property\",\n      \"punctuation\",\n      \"punctuation.bracket\",\n      \"punctuation.delimiter\",\n      \"string\",\n      \"string.special\",\n      \"tag\",\n      \"type\",\n      \"type.builtin\",\n      \"variable\",\n      \"variable.builtin\",\n      \"variable.parameter\",\n      \"comment\",\n      \"macro\",\n      \"label\",\n    ]\n\n```\nFor example, hh0 would refer to an attribute and hh20 would be a label. You'll want to add some css classes for each attribute. Because this is a common tree-sitter theme, if you search for neovim themes that support tree-sitter, you can find items like `TSFunction` and `TSAttribute` with examples. A basic theme is provided below:\n```css\n.hh4 {\n  color: purple;\n}\n\n.hh3 {\n  color: blue;\n}\n\n.hh13 {\n  color: pink;\n}\n\n.hh10 {\n  color: green;\n}\n\n.hh5 {\n  color: gray;\n}\n\n.hh18 {\n  color: lightgray;\n}\n```\n\n## M1 support\nCurrently Github Actions does not seem to fully support compiling C++ dependencies for the M1. I am unsure if it is even possible to cross compile from a x64 VM, and it does not offer arm VMs. Since it is unlikely you will be hosting the server on an M1 machine, you can still develop on the M1 as I do by running the `npm install` and `npm run build` commands from the root of the package.","readmeFilename":"README.md","gitHead":"5c0688f471ccc9b32537122a87c8f0e296b0a155","description":"A blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP","dependencies":{"@benwis/femark-win32-x64-msvc":"0.1.1","@benwis/femark-darwin-x64":"0.1.1","@benwis/femark-linux-x64-gnu":"0.1.1"},"_id":"@benwis/femark@0.1.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-CelfqyVHGdgab5Sk7FRIXW+WXtj+bX83qzcYWQ66MXsIqyoi9SSB6rz3wJSUe/xw9qTaI1r5ak/KKlhRAFqVWw==","shasum":"bc251ccc79ea83416df70196fcae5c9887cefe5b","tarball":"https://registry.npmjs.org/@benwis/femark/-/femark-0.1.1.tgz","fileCount":10,"unpackedSize":43802,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/JsGrYojSs6xkDRRTTMDbzNXtUtY/mDywVVUw+p9GZwIhAMDdZZKOuYoXcoBJJOYfBWFZxnwpVpqJuBurs85ZfRPD"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisg30ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYNxAAh8cB24qFePo/e3U2x56JUDL6fPHmxc/5/C828cMFP7QGrid7\r\nkbgcC9eTVKWmdnNdsEQyKDGe67jNDzHINqJt75geFFYzXIRtk96Ali710rRV\r\nszuysjMUtUx2sxE071vE/ds7DtcliJfeR/9OX2F170ZY1k7JXF6c5sa1ObY4\r\nRy04XqP8e+w4q2bgVtwxk1ul2Tqeb/6ghPo7XA5Me4z4GFVvcrjUSX6IRFkz\r\nhLMjU1WqDTjTwsWgMUpVrX35twF9GYWYf+N8OeG95191PTStswvDzDjbybyW\r\nNusaySiXYZIQCeuaiys+tUU6qSXLp4rKSRvnLByFV1B72p6Fhup9E/VQ46a4\r\nLFMj7U3dh6PNBPj/dKQema8WGZwekwhTe023iS5d7xv0z8qDCbAVcL9GT78m\r\njGK2KHF5oY5C8es9fYW8ppQyu+sQED++mWO9qWtfOl1I9yBwhMssbgO458MM\r\nieQjfCVcj0cwUw0NpgB4zKGpI5jhkm32LNhbtx5hXih73FFBNcySwC9EnmNu\r\nb7Z1+ggKeHsrXp8s3fT4/ilD4uIgjckf7Se1TmaipdLHrR4UJOgVMmInqtvy\r\n6mP5gtSoGVprM6Go7SGkpOUN0MuWBvMZznUU4Q0GUHknCWnNu6oMOoWTQsUW\r\nfzeSLDhXvwl0j1meUfvaYu4PYbTZHqIB8zc=\r\n=HgYO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"benwis","email":"benwis@protonmail.com"},"directories":{},"maintainers":[{"name":"benwis","email":"benwis@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/femark_0.1.1_1655836148148_0.012532441330963096"},"_hasShrinkwrap":false},"0.1.2":{"name":"@benwis/femark","version":"0.1.2","main":"index.js","types":"index.d.ts","napi":{"name":"femark","triples":{}},"license":"MIT","devDependencies":{"@napi-rs/cli":"^2.9.0","ava":"^4.2.0"},"engines":{"node":">= 10"},"scripts":{"artifacts":"napi artifacts","build":"napi build --platform --release","build:debug":"napi build --platform","prepublishOnly":"napi prepublish -t npm","test":"ava","version":"napi version"},"optionalDependencies":{"@benwis/femark-win32-x64-msvc":"0.1.2","@benwis/femark-darwin-x64":"0.1.2","@benwis/femark-linux-x64-gnu":"0.1.2"},"gitHead":"4968e075c392daaf4f4f6642411a32655fdaa67b","description":"A blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP","dependencies":{"@benwis/femark-win32-x64-msvc":"0.1.2","@benwis/femark-darwin-x64":"0.1.2","@benwis/femark-linux-x64-gnu":"0.1.2"},"_id":"@benwis/femark@0.1.2","_nodeVersion":"17.1.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Kur64TBTiwwargOKHfVBFgmIYOGDCalUFTP67fTYl/n3A7PQsIRJImXID9FtAz290LitqwPRH4ITLcSVpt3Kyg==","shasum":"f5fa9f560e289d8110bf5bbcddafd129c8dca960","tarball":"https://registry.npmjs.org/@benwis/femark/-/femark-0.1.2.tgz","fileCount":10,"unpackedSize":43802,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAidfQlhf5bY4uOhjMbbVwGM7h4SI38+X5qUHdzXdckAiEAoWSQa70ZWkkHHADqeBrp5D6ryAtpwAwp3AGV//AMJ1A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0aUcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJNw/+Nlgu2kYja1e8Nk+KpsHUdFqv60zj6Vqj1E7jyrpNId76h2es\r\nQ3yoNTn086jD+MStBReVzbnFfcqJOLh6JQbq8f1ouU5W0+xqBvv4gf+I0k2R\r\ngNgHlUgdD99Q04OHIJH6PsSlfddVt/eCyy0WTAebfNsYoXqgIwXmaThVuZ7k\r\nCv33u6/DmarI5L1mEdxNrsbQPJicSmVb5esl5F/t3NcjPB++qZXwXmkt6PgI\r\nSh0B0yU05jLaa0vwo7YY4KRIq2yGknipVqHGWA0qRYiWgS+tMVRA7gszFvmu\r\n9nhFsN9YJFmif+UQ/tX6giXFcp90EV/AC1ou10nURkSmZG8nIaV3kB+hmZz4\r\ng7Ivlo37zqEb/4K9Ahlbb0DSlASBM0ITpDJfwbVEkf6ZeUH4BO+hplIsJvwq\r\nNur2EBxETuogOi8EofrMCDyAd5XoKyFxyR9nZZJjCnKT4mxBvRdlQX9PFyke\r\nrdInVxQCShRYEjoT7cblN2uYbVJ/Zi5fTrWLe+8JGWe7/iG0tZ+3KOr1qDiu\r\nkaRcZEcBoPNAuwIk6p0twT9wUZ+w2s0jXDrMkvCIHJUz3D9sxCya1lfCQhh/\r\nYmXyuTKvgmf7MVt7JPeqXhgLhk4PYcLcgvJ/+oiwHff4BzipxMAeGlqqhA1d\r\n8hrIvKHeITDjQz1EoJAHKE+O9Otx4/NQR7E=\r\n=qYBs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"benwis","email":"benwis@protonmail.com"},"directories":{},"maintainers":[{"name":"benwis","email":"benwis@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/femark_0.1.2_1657906459798_0.5832606762681218"},"_hasShrinkwrap":false}},"maintainers":[{"name":"benwis","email":"benwis@protonmail.com"}],"description":"A blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP","license":"MIT","readme":"# femark\n\nA blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface. PRs are welcome. Very much a WIP\n\n## Install\n\n```sh\nnpm i @benwis/femark\n```\n\n## Use\nThe package exposes one function that will process your markdown and compile it to HTML. It will also generate a table of contents for you with your heading tags and their respective level. If you have no headings, toc should be undefined, but if there is an error parsing your markdown, it will throw an error.\n\nIt is recomended to run this on the server side, since it has a fairly large package size. If you are using Remix, I recommend you use this in your loaders or actions.\n\n```ts\n let {content, toc} = processMarkdownToHtml('# Hello, World!');\n```\n\n## Supported Languages\n\n- Rust\n- Typescript\n- Tsx\n- Javascript\n- Jsx\n- Dockerfile\n- Python\n- Go\n- C\n- HTML\n- TOML\n- JSON\n\nCurrently the supported languages are driven mostly by my needs, but I am open to PRs to add additional language support if they are popular. \n\n## Theme\n\nBy default, this package does not style your code blocks, merely decorates the elements with classes that range from `hh0` to `hh20`. The indices refer to the elements in this list:\n```rust\nlet highlight_names = [\n      \"attribute\",\n      \"constant\",\n      \"function.builtin\",\n      \"function\",\n      \"keyword\",\n      \"operator\",\n      \"property\",\n      \"punctuation\",\n      \"punctuation.bracket\",\n      \"punctuation.delimiter\",\n      \"string\",\n      \"string.special\",\n      \"tag\",\n      \"type\",\n      \"type.builtin\",\n      \"variable\",\n      \"variable.builtin\",\n      \"variable.parameter\",\n      \"comment\",\n      \"macro\",\n      \"label\",\n    ]\n\n```\nFor example, hh0 would refer to an attribute and hh20 would be a label. You'll want to add some css classes for each attribute. Because this is a common tree-sitter theme, if you search for neovim themes that support tree-sitter, you can find items like `TSFunction` and `TSAttribute` with examples. A basic theme is provided below:\n```css\n.hh4 {\n  color: purple;\n}\n\n.hh3 {\n  color: blue;\n}\n\n.hh13 {\n  color: pink;\n}\n\n.hh10 {\n  color: green;\n}\n\n.hh5 {\n  color: gray;\n}\n\n.hh18 {\n  color: lightgray;\n}\n```\n\n## M1 support\nCurrently Github Actions does not seem to fully support compiling C++ dependencies for the M1. I am unsure if it is even possible to cross compile from a x64 VM, and it does not offer arm VMs. Since it is unlikely you will be hosting the server on an M1 machine, you can still develop on the M1 as I do by running the `npm install` and `npm run build` commands from the root of the package.","readmeFilename":"README.md"}