@accuser/svelte-mdast-gfm
v0.2.0
Published
Transform [Mdast](https://github.com/syntax-tree/mdast) into Svelte components.
Downloads
40
Maintainers
Readme
Svelte Unist
Transform Mdast into Svelte components.
Installing
Add the @accuser/svelte-hast
package dependency to your Svelte / SvelteKit project:
npm install --save-dev @accuser/svelte-mdast
Usage
<script lang="ts">
import { Mdast } from '@accuser/Mdast.svelte';
import { u } from 'unist-builder';
const ast: import('mdast').Root = u('root', [
u('heading', { depth: 1 as const }, [u('text', 'Hello, World!')]),
]);
</script>
<Mdast {ast} />
Test
npm test
License
Copyright
Copyrigth © 2024 Matthew Gibbons