@humanspeak/svelte-markdown 0.8.1 → 0.8.3
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/README.md +4 -3
- package/dist/index.d.ts +2 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -136,17 +136,18 @@ Here's a complete example of a custom renderer with TypeScript support:
|
|
|
136
136
|
children?: Snippet
|
|
137
137
|
href?: string
|
|
138
138
|
title?: string
|
|
139
|
-
text?: string
|
|
140
139
|
}
|
|
141
140
|
|
|
142
|
-
const { href = '', title = '',
|
|
141
|
+
const { href = '', title = '', children }: Props = $props()
|
|
143
142
|
</script>
|
|
144
143
|
|
|
145
144
|
<a {href} {title} class="custom-link">
|
|
146
|
-
{@render children?.()
|
|
145
|
+
{@render children?.()}
|
|
147
146
|
</a>
|
|
148
147
|
```
|
|
149
148
|
|
|
149
|
+
If you would like to extend other renderers please take a look inside the [renderers folder](https://github.com/humanspeak/svelte-markdown/tree/main/src/lib/renderers) for the default implentation of them. If you would like feature additions please feel free to open an issue!
|
|
150
|
+
|
|
150
151
|
## Advanced Features
|
|
151
152
|
|
|
152
153
|
### Table Support with Mixed Content
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { HtmlRenderers } from './renderers/html/index.js';
|
|
1
2
|
import type { RendererComponent, Renderers, Token, TokensList } from './utils/markdown-parser.js';
|
|
2
3
|
import SvelteMarkdown from './SvelteMarkdown.svelte';
|
|
3
4
|
import type { SvelteMarkdownOptions, SvelteMarkdownProps } from './types.js';
|
|
4
5
|
export default SvelteMarkdown;
|
|
5
|
-
export type { RendererComponent, Renderers, SvelteMarkdownOptions, SvelteMarkdownProps, Token, TokensList };
|
|
6
|
+
export type { HtmlRenderers, RendererComponent, Renderers, SvelteMarkdownOptions, SvelteMarkdownProps, Token, TokensList };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humanspeak/svelte-markdown",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "A powerful, customizable markdown renderer for Svelte with TypeScript support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"svelte",
|
|
@@ -72,41 +72,41 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"github-slugger": "^2.0.0",
|
|
74
74
|
"htmlparser2": "^10.0.0",
|
|
75
|
-
"marked": "^15.0.
|
|
75
|
+
"marked": "^15.0.9"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@eslint/compat": "^1.2.8",
|
|
79
|
-
"@eslint/js": "^9.
|
|
80
|
-
"@playwright/test": "^1.
|
|
79
|
+
"@eslint/js": "^9.25.1",
|
|
80
|
+
"@playwright/test": "^1.52.0",
|
|
81
81
|
"@sveltejs/adapter-auto": "^6.0.0",
|
|
82
|
-
"@sveltejs/kit": "^2.20.
|
|
83
|
-
"@sveltejs/package": "^2.3.
|
|
82
|
+
"@sveltejs/kit": "^2.20.7",
|
|
83
|
+
"@sveltejs/package": "^2.3.11",
|
|
84
84
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
85
85
|
"@testing-library/jest-dom": "^6.6.3",
|
|
86
86
|
"@testing-library/svelte": "^5.2.7",
|
|
87
87
|
"@testing-library/user-event": "^14.6.1",
|
|
88
|
-
"@types/node": "^22.14.
|
|
89
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
90
|
-
"@typescript-eslint/parser": "^8.
|
|
91
|
-
"@vitest/coverage-v8": "^3.1.
|
|
92
|
-
"eslint": "^9.
|
|
93
|
-
"eslint-config-prettier": "^10.1.
|
|
88
|
+
"@types/node": "^22.14.1",
|
|
89
|
+
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
90
|
+
"@typescript-eslint/parser": "^8.31.0",
|
|
91
|
+
"@vitest/coverage-v8": "^3.1.2",
|
|
92
|
+
"eslint": "^9.25.1",
|
|
93
|
+
"eslint-config-prettier": "^10.1.2",
|
|
94
94
|
"eslint-plugin-import": "^2.31.0",
|
|
95
95
|
"eslint-plugin-svelte": "^3.5.1",
|
|
96
96
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
97
97
|
"globals": "^16.0.0",
|
|
98
|
-
"jsdom": "^26.
|
|
98
|
+
"jsdom": "^26.1.0",
|
|
99
99
|
"prettier": "^3.5.3",
|
|
100
100
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
101
101
|
"prettier-plugin-svelte": "^3.3.3",
|
|
102
102
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
103
|
-
"publint": "^0.3.
|
|
104
|
-
"svelte": "^5.
|
|
105
|
-
"svelte-check": "^4.1.
|
|
103
|
+
"publint": "^0.3.12",
|
|
104
|
+
"svelte": "^5.28.2",
|
|
105
|
+
"svelte-check": "^4.1.6",
|
|
106
106
|
"typescript": "^5.8.3",
|
|
107
|
-
"typescript-eslint": "^8.
|
|
108
|
-
"vite": "^6.2
|
|
109
|
-
"vitest": "^3.1.
|
|
107
|
+
"typescript-eslint": "^8.31.0",
|
|
108
|
+
"vite": "^6.3.2",
|
|
109
|
+
"vitest": "^3.1.2"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
112
|
"svelte": "^5.0.0"
|