@mdsvex/render 1.0.0-next.1 → 1.0.0-next.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/dist/component.d.ts +43 -0
- package/dist/component.js +31 -10
- package/dist/entities.d.ts +2 -0
- package/dist/html_cursor.d.ts +410 -0
- package/dist/html_cursor.js +3061 -2063
- package/dist/index.d.ts +9 -0
- package/dist/mappings.d.ts +117 -0
- package/dist/scope.d.ts +52 -0
- package/dist/sourcemap.d.ts +108 -0
- package/dist/stream.d.ts +87 -0
- package/dist/stream.js +123 -0
- package/package.json +22 -14
- package/src/Node.svelte +124 -7
- package/src/component.ts +23 -0
- package/src/html_cursor.ts +2216 -306
- package/src/index.ts +12 -9
- package/src/sourcemap.ts +6 -1
- package/src/stream.ts +223 -0
- package/CHANGELOG.md +0 -310
- package/test/_gen_chain.mjs +0 -67
- package/test/_vite_debug.mjs +0 -91
- package/test/_vite_debug2.mjs +0 -34
- package/test/component.spec.ts +0 -120
- package/test/escape_text.spec.ts +0 -90
- package/test/highlight.spec.ts +0 -242
- package/test/html_cursor.spec.ts +0 -640
- package/test/mappings.spec.ts +0 -703
- package/test/scripts.spec.ts +0 -225
- package/test/trace.spec.ts +0 -247
- package/test/wire_tree_builder.spec.ts +0 -156
- package/tsconfig.json +0 -11
- package/vite.config.build.ts +0 -33
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CursorHTMLRenderer } from './html_cursor';
|
|
1
|
+
export { CursorHTMLRenderer } from './html_cursor.js';
|
|
2
2
|
export type {
|
|
3
3
|
CursorBlockEntry,
|
|
4
4
|
TemplateWrapper,
|
|
@@ -7,7 +7,10 @@ export type {
|
|
|
7
7
|
HighlightedCode,
|
|
8
8
|
HighlightWarningCode,
|
|
9
9
|
PreMeta,
|
|
10
|
-
|
|
10
|
+
SmartPunctuation,
|
|
11
|
+
SmartPunctuationOptions,
|
|
12
|
+
SmartQuotes,
|
|
13
|
+
} from './html_cursor.js';
|
|
11
14
|
export {
|
|
12
15
|
_emit,
|
|
13
16
|
_node,
|
|
@@ -23,16 +26,16 @@ export {
|
|
|
23
26
|
K_LINE_BREAK,
|
|
24
27
|
K_FRONTMATTER,
|
|
25
28
|
K_IMPORT_STATEMENT,
|
|
26
|
-
} from './html_cursor';
|
|
27
|
-
export { ComponentRenderer } from './component';
|
|
28
|
-
export type { ComponentBlock } from './component';
|
|
29
|
-
export { CI_TEXT, CI_CODE, CI_SVELTE, CI_STRUCTURE } from './mappings';
|
|
29
|
+
} from './html_cursor.js';
|
|
30
|
+
export { ComponentRenderer } from './component.js';
|
|
31
|
+
export type { ComponentBlock } from './component.js';
|
|
32
|
+
export { CI_TEXT, CI_CODE, CI_SVELTE, CI_STRUCTURE } from './mappings.js';
|
|
30
33
|
export type {
|
|
31
34
|
Mapping,
|
|
32
35
|
CodeInformation,
|
|
33
36
|
MappingRole,
|
|
34
37
|
MappingData,
|
|
35
|
-
} from './mappings';
|
|
38
|
+
} from './mappings.js';
|
|
36
39
|
export {
|
|
37
40
|
build_line_starts,
|
|
38
41
|
offset_to_position,
|
|
@@ -41,10 +44,10 @@ export {
|
|
|
41
44
|
trace_to_v3,
|
|
42
45
|
trace_to_decoded,
|
|
43
46
|
mapped_source_lines,
|
|
44
|
-
} from './sourcemap';
|
|
47
|
+
} from './sourcemap.js';
|
|
45
48
|
export type {
|
|
46
49
|
SourceMapV3,
|
|
47
50
|
MapTrace,
|
|
48
51
|
DecodedSegment,
|
|
49
52
|
DecodedSourceMapV3,
|
|
50
|
-
} from './sourcemap';
|
|
53
|
+
} from './sourcemap.js';
|
package/src/sourcemap.ts
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
* sourcemap utilities: line-starts, offset to position, vlq, v3 conversion.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type {
|
|
6
|
+
Mapping,
|
|
7
|
+
MappingData,
|
|
8
|
+
MapSink,
|
|
9
|
+
RecordMapping,
|
|
10
|
+
} from './mappings.js';
|
|
6
11
|
|
|
7
12
|
// mirrors mappings.ts, local const enums build to literals while imported
|
|
8
13
|
// consts live in module cells that turbofan reloads on every use
|
package/src/stream.ts
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* what a streaming view needs from plugins, what they wrote, live, for the
|
|
3
|
+
* components that read it, and the nodes their deferred work changed
|
|
4
|
+
*
|
|
5
|
+
* const stream = new PluginStream({ plugins });
|
|
6
|
+
* stream.renderers.push(renderer);
|
|
7
|
+
* stream.on_change(() => renderer.update(stream.buffer, ''));
|
|
8
|
+
* for await (const batch of batches) stream.apply(batch);
|
|
9
|
+
* await stream.end();
|
|
10
|
+
*
|
|
11
|
+
* a component reads the data from the context under PLUGIN_DATA, which a
|
|
12
|
+
* compiled document sets too, so it reads the same in a stream and a compile
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { PluginDispatcher, WireTextSource } from '@mdsvex/parse';
|
|
16
|
+
import type {
|
|
17
|
+
DataChange,
|
|
18
|
+
DirectiveTable,
|
|
19
|
+
HeadingIds,
|
|
20
|
+
ParsePlugin,
|
|
21
|
+
PluginDocument,
|
|
22
|
+
} from '@mdsvex/parse';
|
|
23
|
+
import type { NodeBuffer } from '@mdsvex/parse/utils';
|
|
24
|
+
import { WireTreeBuilder } from '@mdsvex/parse/wire-tree-builder';
|
|
25
|
+
import { createSubscriber } from 'svelte/reactivity';
|
|
26
|
+
|
|
27
|
+
const NONE = 0xffffffff;
|
|
28
|
+
|
|
29
|
+
/** the context key of what plugins wrote, the same in every copy of this module */
|
|
30
|
+
export const PLUGIN_DATA: unique symbol = Symbol.for(
|
|
31
|
+
'mdsvex.plugin_data'
|
|
32
|
+
) as any;
|
|
33
|
+
|
|
34
|
+
/** what plugins wrote, by plugin name, undefined while none wrote anything */
|
|
35
|
+
export type PluginDataValue = Readonly<
|
|
36
|
+
Record<string, Readonly<Record<string, unknown>>>
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
/** the value under PLUGIN_DATA, current is read again as it changes */
|
|
40
|
+
export interface PluginDataContext {
|
|
41
|
+
readonly current: PluginDataValue | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* what plugins wrote, followed through on_data, current is a new object after
|
|
46
|
+
* each change, read in a component or an effect it runs again when that comes
|
|
47
|
+
*/
|
|
48
|
+
export class LiveData implements PluginDataContext {
|
|
49
|
+
#data: PluginDataValue | undefined = undefined;
|
|
50
|
+
#update: (() => void) | null = null;
|
|
51
|
+
#subscribe = createSubscriber((update) => {
|
|
52
|
+
this.#update = update;
|
|
53
|
+
return () => {
|
|
54
|
+
this.#update = null;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
get current(): PluginDataValue | undefined {
|
|
59
|
+
this.#subscribe();
|
|
60
|
+
return this.#data;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** the value of a key after a change, undefined once it holds nothing */
|
|
64
|
+
change({ plugin, key, value }: DataChange): void {
|
|
65
|
+
const data = this.#data;
|
|
66
|
+
const own = data?.[plugin];
|
|
67
|
+
const next: Record<string, unknown> = { ...own };
|
|
68
|
+
if (value === undefined) delete next[key];
|
|
69
|
+
else next[key] = value;
|
|
70
|
+
const all: Record<string, Readonly<Record<string, unknown>>> = { ...data };
|
|
71
|
+
if (Object.keys(next).length === 0) delete all[plugin];
|
|
72
|
+
else all[plugin] = next;
|
|
73
|
+
this.#data = Object.keys(all).length === 0 ? undefined : all;
|
|
74
|
+
this.#update?.();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** follows a dispatcher, returns what stops it */
|
|
78
|
+
follow(dispatcher: PluginDispatcher): () => void {
|
|
79
|
+
return dispatcher.on_data((change) => this.change(change));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** nothing written, for the next document */
|
|
83
|
+
reset(): void {
|
|
84
|
+
if (this.#data === undefined) return;
|
|
85
|
+
this.#data = undefined;
|
|
86
|
+
this.#update?.();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** a renderer that caches blocks, a patched node renders its block again */
|
|
91
|
+
export interface PatchedBlocks {
|
|
92
|
+
invalidate(buf: NodeBuffer, nodes: readonly number[]): void;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface PluginStreamOptions {
|
|
96
|
+
plugins?: ParsePlugin[];
|
|
97
|
+
directive_handlers?: DirectiveTable[];
|
|
98
|
+
/** makes the id of each heading as it arrives, make_heading_ids in mdsvex */
|
|
99
|
+
headings?: HeadingIds;
|
|
100
|
+
/** what the handlers learn about the document, see set_document */
|
|
101
|
+
document?: PluginDocument;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* a document arriving over the wire with its plugins, the builder, the
|
|
106
|
+
* dispatcher, the data as it changes, and the nodes deferred tasks patch
|
|
107
|
+
*/
|
|
108
|
+
export class PluginStream {
|
|
109
|
+
readonly builder: WireTreeBuilder;
|
|
110
|
+
/** null for a stream with no plugin */
|
|
111
|
+
readonly dispatcher: PluginDispatcher | null;
|
|
112
|
+
/** what plugins wrote, for the components that read it */
|
|
113
|
+
readonly data = new LiveData();
|
|
114
|
+
/** renderers whose cached blocks a patch drops */
|
|
115
|
+
readonly renderers: PatchedBlocks[] = [];
|
|
116
|
+
private listeners: (() => void)[] = [];
|
|
117
|
+
private stops: (() => void)[] = [];
|
|
118
|
+
private ended = false;
|
|
119
|
+
|
|
120
|
+
constructor(options: PluginStreamOptions = {}) {
|
|
121
|
+
const { plugins, directive_handlers } = options;
|
|
122
|
+
const plugged =
|
|
123
|
+
(plugins !== undefined && plugins.length > 0) ||
|
|
124
|
+
(directive_handlers !== undefined && directive_handlers.length > 0);
|
|
125
|
+
const dispatcher = plugged
|
|
126
|
+
? new PluginDispatcher(
|
|
127
|
+
plugins,
|
|
128
|
+
new WireTextSource([]),
|
|
129
|
+
directive_handlers
|
|
130
|
+
)
|
|
131
|
+
: null;
|
|
132
|
+
this.dispatcher = dispatcher;
|
|
133
|
+
this.builder = new WireTreeBuilder(128, dispatcher ?? undefined);
|
|
134
|
+
if (options.headings !== undefined)
|
|
135
|
+
this.builder.set_headings(options.headings);
|
|
136
|
+
if (dispatcher !== null) {
|
|
137
|
+
dispatcher.set_document(options.document);
|
|
138
|
+
this.stops.push(
|
|
139
|
+
this.data.follow(dispatcher),
|
|
140
|
+
// a task that settled applies at once, and its node renders again
|
|
141
|
+
dispatcher.on_settled(() => {
|
|
142
|
+
if (this.patch()) this.changed();
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** the buffer the builder fills */
|
|
149
|
+
get buffer(): NodeBuffer {
|
|
150
|
+
return this.builder.get_buffer();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** a batch of the wire, then the deferred work that is ready */
|
|
154
|
+
apply(batch: unknown[][]): void {
|
|
155
|
+
this.builder.apply(batch);
|
|
156
|
+
this.patch();
|
|
157
|
+
this.changed();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* the stream ended, after finish of the parser, runs the sequential passes,
|
|
162
|
+
* waits for the deferred tasks still running, then runs the document hooks,
|
|
163
|
+
* a promise when any of that waits, every block renders again after it
|
|
164
|
+
*/
|
|
165
|
+
end(): Promise<void> | undefined {
|
|
166
|
+
if (this.ended) return undefined;
|
|
167
|
+
this.ended = true;
|
|
168
|
+
this.builder.end();
|
|
169
|
+
const dispatcher = this.dispatcher;
|
|
170
|
+
if (dispatcher === null) return undefined;
|
|
171
|
+
const buf = this.buffer;
|
|
172
|
+
dispatcher.run_sequential(buf);
|
|
173
|
+
const finished = dispatcher.finish(buf);
|
|
174
|
+
this.everything();
|
|
175
|
+
if (finished === undefined) return undefined;
|
|
176
|
+
return finished.then(() => this.everything());
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** applies the deferred tasks that are ready, true when one patched a node */
|
|
180
|
+
patch(): boolean {
|
|
181
|
+
const dispatcher = this.dispatcher;
|
|
182
|
+
if (dispatcher === null) return false;
|
|
183
|
+
const nodes = dispatcher.apply_ready();
|
|
184
|
+
if (nodes === null) return false;
|
|
185
|
+
const buf = this.buffer;
|
|
186
|
+
for (const renderer of this.renderers) renderer.invalidate(buf, nodes);
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** listener runs after each batch and each patch, so a view renders again */
|
|
191
|
+
on_change(listener: () => void): () => void {
|
|
192
|
+
this.listeners.push(listener);
|
|
193
|
+
return () => {
|
|
194
|
+
const at = this.listeners.indexOf(listener);
|
|
195
|
+
if (at !== -1) this.listeners.splice(at, 1);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** stops following the dispatcher, a task still running applies nowhere */
|
|
200
|
+
stop(): void {
|
|
201
|
+
for (const stop of this.stops) stop();
|
|
202
|
+
this.stops.length = 0;
|
|
203
|
+
this.listeners.length = 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** the whole tree may have changed, every block renders again */
|
|
207
|
+
private everything(): void {
|
|
208
|
+
const buf = this.buffer;
|
|
209
|
+
const blocks: number[] = [];
|
|
210
|
+
let child = buf.first_child_at(0);
|
|
211
|
+
while (child !== NONE && buf.parent_at(child) === 0) {
|
|
212
|
+
blocks.push(child);
|
|
213
|
+
child = buf.next_at(child);
|
|
214
|
+
}
|
|
215
|
+
if (blocks.length !== 0)
|
|
216
|
+
for (const renderer of this.renderers) renderer.invalidate(buf, blocks);
|
|
217
|
+
this.changed();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
private changed(): void {
|
|
221
|
+
for (const listener of this.listeners.slice()) listener();
|
|
222
|
+
}
|
|
223
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
## 1.0.0-next.0
|
|
2
|
-
|
|
3
|
-
## 1.0.0-next.1
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#866](https://github.com/pngwn/MDsveX/pull/866) [`60da683`](https://github.com/pngwn/MDsveX/commit/60da68313df11747bdd6235dffc325c30af60cb2) Thanks [@pngwn](https://github.com/pngwn)! - Import statements at the top of a document are kept. They go into the document's instance `<script>`, or into a new `<script>` when there is none.
|
|
8
|
-
|
|
9
|
-
```md
|
|
10
|
-
import Chart from './Chart.svelte'
|
|
11
|
-
|
|
12
|
-
<Chart />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
- [#873](https://github.com/pngwn/MDsveX/pull/873) [`69b6c62`](https://github.com/pngwn/MDsveX/commit/69b6c624256f1e8fb1cf8e5f348980a043f2c1db) Thanks [@pngwn](https://github.com/pngwn)! - `component_mode: 'all'` now replaces HTML you type as well as elements written in markdown:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
mdsvex({ components: '#lib/markdown.ts', component_mode: 'all' });
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
A lowercase element such as `<h2>` or `<img>` uses the same replacement as its markdown form, and a custom tag such as `<warning>` uses a `warning` export, so a components module can provide tags that work in every document without imports. Attributes pass through as props exactly as written, including `{expr}`, `{shorthand}`, `{...spread}` and `{@attach}`. A typed `h1` to `h6` gets `level`, and an `ol` without `start` gets `start={1}`. Children arrive as `children`, and void elements get none.
|
|
22
|
-
|
|
23
|
-
`<svelte:*>` tags and capitalised components are never replaced, so `<svelte:element this="img">` renders a plain element. An element with a directive (`bind:`, `on:`, `use:`, `class:`, `style:`, `transition:`, `in:`, `out:`, `animate:` or `let:`) stays an element, because a component can't take one. The compiler warns about it, and `compile()` returns the warning in `warnings`.
|
|
24
|
-
|
|
25
|
-
- [#870](https://github.com/pngwn/MDsveX/pull/870) [`fa297f9`](https://github.com/pngwn/MDsveX/commit/fa297f9b3fda7cc11c3f4274ba0b0cc27acedf9a) Thanks [@pngwn](https://github.com/pngwn)! - Elements written in markdown can be replaced with your own Svelte components. Point the `components` option at one or more modules, and each export named after an element replaces that element:
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
// vite.config.ts
|
|
29
|
-
mdsvex({ components: '#lib/markdown.ts' });
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
// src/lib/markdown.ts
|
|
34
|
-
export { default as h2 } from './Heading.svelte';
|
|
35
|
-
export { default as img } from './Image.svelte';
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Specifiers resolve the way an import from the Vite root would, so aliases, package exports and `#lib/...` subpath imports work, as does `new URL('./markdown.ts', import.meta.url)`. A `.svelte` module works too, and its `<script module>` exports are the replacements.
|
|
39
|
-
|
|
40
|
-
Only elements produced by markdown syntax or by parse plugins are replaced. HTML you type yourself stays as it is. A replacement gets the element's attributes as props, plus `children` unless the element is void (`img`, `hr`, `br`). Some elements also get extra props:
|
|
41
|
-
- `h1` to `h6` get `level`.
|
|
42
|
-
- `pre` gets `lang`, `meta` and the raw `code`.
|
|
43
|
-
- `ol` gets `start`.
|
|
44
|
-
- `li` gets `checked`, when a plugin sets it.
|
|
45
|
-
- `th` and `td` get `align`.
|
|
46
|
-
|
|
47
|
-
Each document imports only the components it uses. When a module's export names change, the dev server recompiles the documents that use it.
|
|
48
|
-
|
|
49
|
-
- [#874](https://github.com/pngwn/MDsveX/pull/874) [`311902d`](https://github.com/pngwn/MDsveX/commit/311902de7c606430e3899440d37def14f5190b6c) Thanks [@pngwn](https://github.com/pngwn)! - Generic directives now render as your own Svelte components. A components module declares its directives with a `directives` namespace export. Directives are a separate namespace from element replacements, so a `table` export never serves `:::table`:
|
|
50
|
-
|
|
51
|
-
```ts
|
|
52
|
-
// src/lib/markdown.ts, passed as mdsvex({ components: '#lib/markdown.ts' })
|
|
53
|
-
export { default as img } from './Image.svelte';
|
|
54
|
-
export * as directives from './directives.ts';
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
// src/lib/directives.ts
|
|
59
|
-
export { default as Callout } from './Callout.svelte';
|
|
60
|
-
export { default as abbr } from './Abbr.svelte';
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Here is what each directive passes to its component:
|
|
64
|
-
- **Args** arrive as string props.
|
|
65
|
-
- **Leaf and container text** in the brackets arrives as a `label` snippet.
|
|
66
|
-
- **Inline directive text** arrives as `children`.
|
|
67
|
-
- **A container's body** arrives as `children`.
|
|
68
|
-
|
|
69
|
-
So `:::Callout[Heads up](kind=warn)` passes `kind="warn"`, a `label` snippet and the body as `children`.
|
|
70
|
-
|
|
71
|
-
A directive with no component is passed to parse plugins' `directive_inline`, `directive_leaf` and `directive_container` handlers. If none of them replaces it, the compile fails with a `DirectiveError` that names the directive and its line. Before this change, an unhandled directive rendered as its children and a leaf directive disappeared. A directive with a component never reaches a plugin's directive handlers.
|
|
72
|
-
|
|
73
|
-
- [#899](https://github.com/pngwn/MDsveX/pull/899) [`1219ceb`](https://github.com/pngwn/MDsveX/commit/1219ceb0c6805ac8b169dadb13694f354d96a619) Thanks [@pngwn](https://github.com/pngwn)! - Tables can have header columns and merged cells. A `||` in the delimiter row, matched by an empty `||` cell in the header row, turns the columns on its narrower side into row headers, and two `||` give headers on both sides. A cell holding only `>` merges into the cell to its left, and a cell holding only `^` merges into the cell above. Merged cells must form rectangles, and a marker that can't merge stays text.
|
|
74
|
-
|
|
75
|
-
```md
|
|
76
|
-
| maybe || title |> |
|
|
77
|
-
|-------||-------|---|
|
|
78
|
-
| hello || text | b |
|
|
79
|
-
|^ || more | c |
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
- [#872](https://github.com/pngwn/MDsveX/pull/872) [`045aca9`](https://github.com/pngwn/MDsveX/commit/045aca94077183b8b58bb59c45813f0aa4f33cde) Thanks [@pngwn](https://github.com/pngwn)! - Frontmatter becomes the document's metadata. The compiled component exports it from its `<script module>` as `metadata`, and `compile()` returns it as `metadata`. When the document already has a module script, the export goes into that script.
|
|
83
|
-
|
|
84
|
-
```md
|
|
85
|
-
---
|
|
86
|
-
title: Hello
|
|
87
|
-
tags: [svelte, markdown]
|
|
88
|
-
---
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
```svelte
|
|
92
|
-
<script module>
|
|
93
|
-
export const metadata = {"title":"Hello","tags":["svelte","markdown"]};
|
|
94
|
-
</script>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
mdsvex parses the YAML that frontmatter commonly holds: strings, numbers, booleans, null, nested maps, block and flow sequences, `|` and `>` blocks and comments. Dates stay strings. Anything else, such as anchors or tags, fails with an error naming the line. For full YAML, pass a parser:
|
|
98
|
-
|
|
99
|
-
```js
|
|
100
|
-
import { parse } from 'yaml';
|
|
101
|
-
|
|
102
|
-
mdsvex({ frontmatter: { parse } });
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
- [#895](https://github.com/pngwn/MDsveX/pull/895) [`57ecb44`](https://github.com/pngwn/MDsveX/commit/57ecb446b292a3406dcf62550986ed15e1aa2b80) Thanks [@pngwn](https://github.com/pngwn)! - Code blocks can hold live Svelte expressions. An `[!eval]` comment makes every top-level `{...}` group in its range live, and everything else stays text:
|
|
106
|
-
|
|
107
|
-
````md
|
|
108
|
-
```sh
|
|
109
|
-
{install_command} @pkg/my-pkg # [!eval]
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
function my_func() {
|
|
114
|
-
console.log({ a: { some_val } }); // [!eval ="{some_val}"]
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
````
|
|
118
|
-
|
|
119
|
-
`[!eval]` takes every twinkleplop argument form: bare for its own line, `+N`, `:N..M`, `="{x}"` with an optional `:*`, anchors and pairs. It is on by default and part of `default_annotations`. Values come from the document's script and `metadata` and render as text, so use `{@html}` for markup. A group that doesn't close on its line, or a block tag such as `{#if}`, fails the build with its line and column.
|
|
120
|
-
|
|
121
|
-
The `eval` fence flag means `[!eval]` on every line, on any fence, including ` ```eval ` for a fence with no language. It suits commands and config rather than brace-heavy code. A custom highlighter doesn't support it yet and warns.
|
|
122
|
-
|
|
123
|
-
A replaced `pre` gets `code` as a template literal with the live values in it, such as ``code={`${install_command} @pkg/my-pkg`}``, so a copy button copies what the reader sees. Each live expression gets its own source mapping.
|
|
124
|
-
|
|
125
|
-
- [#866](https://github.com/pngwn/MDsveX/pull/866) [`60da683`](https://github.com/pngwn/MDsveX/commit/60da68313df11747bdd6235dffc325c30af60cb2) Thanks [@pngwn](https://github.com/pngwn)! - A top level `<script>` with a `src` attribute, as in pasted tweet or Instagram embeds, renders as `<svelte:element this={"script"}>`. Svelte treats every top level `<script>` as the component script, so two embeds used to fail to compile.
|
|
126
|
-
|
|
127
|
-
- [#891](https://github.com/pngwn/MDsveX/pull/891) [`8ede5e2`](https://github.com/pngwn/MDsveX/commit/8ede5e2b409511978562fcec3271e7f5182789db) Thanks [@pngwn](https://github.com/pngwn)! - Fenced code and `` `#!lang code` `` spans are highlighted with [twinkleplop](https://twinkleplop.pngwn.at) by default in the Vite plugin. Every twinkleplop language loads the first time a document has code, along with the common aliases (`js`, `ts`, `sh`, `yml`, `md`, `py` and others). Lookup tries the exact name, then the lowercased one. A language mdsvex doesn't know renders as plain twinkleplop markup, with one warning per file. mdsvex adds no CSS, so import a theme yourself:
|
|
128
|
-
|
|
129
|
-
```js
|
|
130
|
-
import '@twinkleplop/theme-github';
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
```ts
|
|
134
|
-
mdsvex({
|
|
135
|
-
highlight: {
|
|
136
|
-
languages: { dockerfile: 'bash' },
|
|
137
|
-
line_numbers: false,
|
|
138
|
-
twoslash: { svelte: true },
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Highlighted output is markup, not `{@html}`. Twinkleplop escapes `{` and `}` as it renders, so code never reaches Svelte as an expression. Fences accept the Shiki, VitePress and rehype-pretty-code meta conventions: `{1,3-4}`, `/word/`, `:line-numbers`, `showLineNumbers`, `[title]`, `title="..."` and `caption="..."`. A title or caption wraps the block in a `<figure>`. Twinkleplop's annotations (`// [!hl]`, `[!focus]`, `[!add]` and the rest) are on by default, and `default_annotations` is exported for extending the list. `twoslash: true` needs `@twinkleplop/twoslash`, and `{ svelte: true }` also needs `@twinkleplop/twoslash-svelte`.
|
|
144
|
-
|
|
145
|
-
`compile()` takes a `highlight` option too. It stays synchronous and doesn't highlight by default. Build a config with `mdsvex/highlight`, which loads the languages in its only async function:
|
|
146
|
-
|
|
147
|
-
```js
|
|
148
|
-
import { compile } from 'mdsvex/compile';
|
|
149
|
-
import { create_highlight, load_default_languages } from 'mdsvex/highlight';
|
|
150
|
-
|
|
151
|
-
const highlight = create_highlight({
|
|
152
|
-
languages: await load_default_languages(),
|
|
153
|
-
});
|
|
154
|
-
compile(source, { highlight, filename: 'post.svx' });
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
`highlight` also takes a synchronous function, `(code, { lang, meta, inline, filename }) => html`, or `false`. A function returns ordinary HTML and mdsvex escapes every brace in it. Returning `null` renders that code plain.
|
|
158
|
-
|
|
159
|
-
A replaced `pre` now gets the whole `<pre>` element as `children`, because Svelte only keeps whitespace inside a `<pre>` it can see. It also gets `lang`, `meta`, `code` (the text a reader sees, without annotation markers), `title`, `caption`, and a prop for each meta part no convention claims, such as `playground` or `height=300`:
|
|
160
|
-
|
|
161
|
-
```svelte
|
|
162
|
-
<script>
|
|
163
|
-
let { code, title, children } = $props();
|
|
164
|
-
</script>
|
|
165
|
-
|
|
166
|
-
<div class="code">
|
|
167
|
-
{#if title}<span>{title}</span>{/if}
|
|
168
|
-
<button onclick={() => navigator.clipboard.writeText(code)}>copy</button>
|
|
169
|
-
{@render children()}
|
|
170
|
-
</div>
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
A highlighted code span goes through the `code` replacement with a `lang` prop. The `language-` class now carries only the language, never the rest of the info string.
|
|
174
|
-
|
|
175
|
-
- [#876](https://github.com/pngwn/MDsveX/pull/876) [`1dceed1`](https://github.com/pngwn/MDsveX/commit/1dceed1b863e202066c943d7b3e463db7e8fdb05) Thanks [@pngwn](https://github.com/pngwn)! - Documents can be wrapped in templates, which were called layouts in mdsvex 0.x. A template is a Svelte component. It gets the frontmatter and any props passed to the document as props, and the document body as `children`:
|
|
176
|
-
|
|
177
|
-
```ts
|
|
178
|
-
// vite.config.ts
|
|
179
|
-
mdsvex({
|
|
180
|
-
templates: {
|
|
181
|
-
default: '#lib/templates/Post.svelte',
|
|
182
|
-
docs: './src/lib/templates/Docs.svelte',
|
|
183
|
-
blog: new URL('./src/Blog.svelte', import.meta.url),
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
```svelte
|
|
189
|
-
<!-- src/lib/templates/Post.svelte -->
|
|
190
|
-
<script module>
|
|
191
|
-
export { default as h2 } from './Heading.svelte';
|
|
192
|
-
</script>
|
|
193
|
-
|
|
194
|
-
<script>
|
|
195
|
-
let { title, children } = $props();
|
|
196
|
-
</script>
|
|
197
|
-
|
|
198
|
-
<article>
|
|
199
|
-
<h1>{title}</h1>
|
|
200
|
-
{@render children()}
|
|
201
|
-
</article>
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Specifiers resolve the way an import from the Vite root would, as with `components`. Element-named exports from a template's `<script module>` replace those elements in the documents it wraps, and they take precedence over the `components` modules. To add replacements to a template you can't edit, pass `{ component, components }`, and the `components` module's exports are merged over the template's own.
|
|
205
|
-
|
|
206
|
-
mdsvex picks a document's template in this order:
|
|
207
|
-
1. Frontmatter `template: false` means no template.
|
|
208
|
-
2. Frontmatter `template: docs` picks that template. An unknown name is an error that lists the known names.
|
|
209
|
-
3. `select_template(id, metadata)`, when given.
|
|
210
|
-
4. The `default` template, when there is one.
|
|
211
|
-
|
|
212
|
-
You can also override the template on an import, with `import Post from './post.svx?template=false'` or `?template=docs`.
|
|
213
|
-
|
|
214
|
-
The document's `<script>`, `<script module>`, `<style>` and top level `<svelte:head>`, `<svelte:window>`, `<svelte:body>`, `<svelte:document>` and `<svelte:options>` stay outside the template. A frontmatter key named `children` is an error when the document has a template. A document that binds its own props with `let props = $props()` forwards `props` to the template. A document that destructures its props forwards nothing.
|
|
215
|
-
|
|
216
|
-
`compile()` takes the same options as plain data, with `templates` mapping names to `{ specifier, components }`, plus `default_template` and `select_template(metadata)`. It returns the name of the template it used as `template`. When a template's export names change, the dev server recompiles the documents that used it.
|
|
217
|
-
|
|
218
|
-
### Patch Changes
|
|
219
|
-
|
|
220
|
-
- [#891](https://github.com/pngwn/MDsveX/pull/891) [`8ede5e2`](https://github.com/pngwn/MDsveX/commit/8ede5e2b409511978562fcec3271e7f5182789db) Thanks [@pngwn](https://github.com/pngwn)! - Braces in code spans, fenced code and fence info strings render as text, so Svelte no longer reads them as expressions.
|
|
221
|
-
|
|
222
|
-
```md
|
|
223
|
-
Use `{ a: 1 }` here.
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
- [#879](https://github.com/pngwn/MDsveX/pull/879) [`79bebc9`](https://github.com/pngwn/MDsveX/commit/79bebc937b5c51d7fb50d06ff09f83bf23d44a87) Thanks [@pngwn](https://github.com/pngwn)! - Leaf and container directive labels now take inline markdown, as inline directive text does. A directive component's `label` snippet renders it, so `:::Callout[Heads *up*]` passes `Heads <strong>up</strong>`. Links, images and autolinks stay literal, and nothing in a label reaches past its closing `]`, so `::x[*a](k=*)` keeps `*a` as text and its args intact.
|
|
227
|
-
|
|
228
|
-
In the parse tree the label is a `directive_label` node, the directive's first child, so a container's label stays apart from its body:
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
directive_container name="Callout"
|
|
232
|
-
directive_label
|
|
233
|
-
text "Heads "
|
|
234
|
-
strong_emphasis
|
|
235
|
-
text "up"
|
|
236
|
-
paragraph
|
|
237
|
-
text "body"
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
- [#862](https://github.com/pngwn/MDsveX/pull/862) [`31aa6e2`](https://github.com/pngwn/MDsveX/commit/31aa6e20390c6fa656845add1d19e0439dda48c7) Thanks [@pngwn](https://github.com/pngwn)! - Parsing, compiling, parse plugins and the vite plugin are faster for documents of every size. The largest gains are in compiles with parse plugins and in the vite plugin, where chaining the Svelte compiler's sourcemap no longer goes through a general purpose remapper.
|
|
241
|
-
|
|
242
|
-
- [#865](https://github.com/pngwn/MDsveX/pull/865) [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4) Thanks [@pngwn](https://github.com/pngwn)! - Parsing, incremental parsing, compiling with and without sourcemaps, parse plugins and the vite plugin are faster again for documents of every size, with the largest gains on small documents, sourcemapped compiles and Windows line endings.
|
|
243
|
-
|
|
244
|
-
- [#856](https://github.com/pngwn/MDsveX/pull/856) [`8bd14fe`](https://github.com/pngwn/MDsveX/commit/8bd14fe77aed1ff532757a06e934fa6238ecb2da) Thanks [@pngwn](https://github.com/pngwn)! - Rendering to HTML without a source map is a few percent faster.
|
|
245
|
-
|
|
246
|
-
- [#855](https://github.com/pngwn/MDsveX/pull/855) [`98a1b87`](https://github.com/pngwn/MDsveX/commit/98a1b87b1c45f192c93bf3b910d6ebc8284b94f4) Thanks [@pngwn](https://github.com/pngwn)! - Rendering markdown to HTML is much faster, up to about 2.9x, and building source maps for the rendered output is many times faster.
|
|
247
|
-
|
|
248
|
-
- [#848](https://github.com/pngwn/MDsveX/pull/848) [`f2ff5fe`](https://github.com/pngwn/MDsveX/commit/f2ff5fe144a9009a79e0aa7a6f08f1bed5a7696c) Thanks [@pngwn](https://github.com/pngwn)! - Sourcemaps for large documents build in linear time, so a 100KB file takes milliseconds instead of over a second in the vite plugin.
|
|
249
|
-
|
|
250
|
-
- [#865](https://github.com/pngwn/MDsveX/pull/865) [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4) Thanks [@pngwn](https://github.com/pngwn)! - Source mappings are now objects whose `sourceOffsets`, `generatedOffsets`, `lengths` and `data` are getters. Read those properties directly; spreading a mapping no longer copies them.
|
|
251
|
-
|
|
252
|
-
```ts
|
|
253
|
-
const copy = { ...mapping, data: other }; // before: offsets copied, now: offsets missing
|
|
254
|
-
const copy = {
|
|
255
|
-
sourceOffsets: mapping.sourceOffsets,
|
|
256
|
-
generatedOffsets: mapping.generatedOffsets,
|
|
257
|
-
lengths: mapping.lengths,
|
|
258
|
-
data: other,
|
|
259
|
-
};
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
- [#896](https://github.com/pngwn/MDsveX/pull/896) [`4c55f5e`](https://github.com/pngwn/MDsveX/commit/4c55f5eea023e687202fa97626b401f09bffd6f7) Thanks [@pngwn](https://github.com/pngwn)! - A replaced `pre` gets `title`, `caption` and meta props from the fence meta with `highlight: false` too, which is the `compile()` default, and when a highlighter returns `null` for a fence. A meta prop that collides with a built-in prop is dropped with the same warning in every mode.
|
|
263
|
-
|
|
264
|
-
````md
|
|
265
|
-
```ts title="math.ts" playground height=300
|
|
266
|
-
const a = 1;
|
|
267
|
-
```
|
|
268
|
-
````
|
|
269
|
-
|
|
270
|
-
gives `title={"math.ts"}`, `playground={true}` and `height={"300"}` whether or not the code is highlighted. A fence that isn't replaced still renders as a plain `<pre><code class="language-ts">` without highlighting, with no `<figure>` for its title or caption.
|
|
271
|
-
|
|
272
|
-
- [#884](https://github.com/pngwn/MDsveX/pull/884) [`e708e1d`](https://github.com/pngwn/MDsveX/commit/e708e1d4c66478efd8606fa2e1ff2fee40e0732a) Thanks [@pngwn](https://github.com/pngwn)! - A fenced code block inside a block quote renders without the quote markers at the start of each line.
|
|
273
|
-
|
|
274
|
-
- [#855](https://github.com/pngwn/MDsveX/pull/855) [`98a1b87`](https://github.com/pngwn/MDsveX/commit/98a1b87b1c45f192c93bf3b910d6ebc8284b94f4) Thanks [@pngwn](https://github.com/pngwn)! - The low-level render helpers exported with a leading underscore now collect source mappings into a `MapSink` instead of an array, and the `PendingMapping` type is no longer exported.
|
|
275
|
-
|
|
276
|
-
- [#871](https://github.com/pngwn/MDsveX/pull/871) [`2867d9b`](https://github.com/pngwn/MDsveX/commit/2867d9b0df02ae44f0475403ce62393bca4f64b9) Thanks [@pngwn](https://github.com/pngwn)! - mdsvex now ships type declarations, so TypeScript finds types for `compile`, `CompileOptions`, `mdsvex` and the other exports instead of reporting a missing declaration file. Types for `@mdsvex/render` also check under TypeScript 6.
|
|
277
|
-
|
|
278
|
-
- [#889](https://github.com/pngwn/MDsveX/pull/889) [`c56db79`](https://github.com/pngwn/MDsveX/commit/c56db798f4f43e437956bb3afb2919c09076cd6e) Thanks [@pngwn](https://github.com/pngwn)! - Character references like `<`, `©` and `{` in text, link and image attributes render as written instead of being escaped a second time. A bare `&`, a backslash escaped `\&` and any `&` inside code are still escaped.
|
|
279
|
-
|
|
280
|
-
```md
|
|
281
|
-
a < b ©
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
- [#875](https://github.com/pngwn/MDsveX/pull/875) [`2927382`](https://github.com/pngwn/MDsveX/commit/29273823dc39bf4ab9b422210ee8acd867c29bc9) Thanks [@pngwn](https://github.com/pngwn)! - Attribute values in raw html render as written, so an entity like `&` is no longer escaped a second time.
|
|
285
|
-
|
|
286
|
-
```md
|
|
287
|
-
<div title="a & b">x</div>
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
- [#873](https://github.com/pngwn/MDsveX/pull/873) [`69b6c62`](https://github.com/pngwn/MDsveX/commit/69b6c624256f1e8fb1cf8e5f348980a043f2c1db) Thanks [@pngwn](https://github.com/pngwn)! - Spread and attachment attributes on HTML you type, such as `<div {...rest} {@attach tooltip}>`, are no longer rendered as `...rest={...rest}`, which Svelte failed to compile.
|
|
291
|
-
|
|
292
|
-
- [#821](https://github.com/pngwn/MDsveX/pull/821) [`ed11417`](https://github.com/pngwn/MDsveX/commit/ed11417775290f85a0b14dda03d1c11d48bbd239) Thanks [@pngwn](https://github.com/pngwn)! - Files with Windows (`\r\n`) or old Mac (`\r`) line endings compile to the same HTML as their `\n` equivalents, and their sourcemaps point at the right lines and columns in the original file.
|
|
293
|
-
|
|
294
|
-
- Updated dependencies [[`cfee8d1`](https://github.com/pngwn/MDsveX/commit/cfee8d1a968ac78329e314650c51785968bf1dff), [`b249bf0`](https://github.com/pngwn/MDsveX/commit/b249bf0dbbfdef330e0e78739b7d44176f9c98b9), [`29b6dd1`](https://github.com/pngwn/MDsveX/commit/29b6dd127efc0d00dff650d320d4d003f6d2b1b6), [`7815ee9`](https://github.com/pngwn/MDsveX/commit/7815ee9d0993774f6f648d46d35ce3f900a6eed4), [`db0418d`](https://github.com/pngwn/MDsveX/commit/db0418d50bcd286a062cd0b6243a234167d11781), [`ebdb9fb`](https://github.com/pngwn/MDsveX/commit/ebdb9fb687933c69da0260eb50e8a4d2fae2bbca), [`79bebc9`](https://github.com/pngwn/MDsveX/commit/79bebc937b5c51d7fb50d06ff09f83bf23d44a87), [`1219ceb`](https://github.com/pngwn/MDsveX/commit/1219ceb0c6805ac8b169dadb13694f354d96a619), [`98a1b87`](https://github.com/pngwn/MDsveX/commit/98a1b87b1c45f192c93bf3b910d6ebc8284b94f4), [`31aa6e2`](https://github.com/pngwn/MDsveX/commit/31aa6e20390c6fa656845add1d19e0439dda48c7), [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4), [`e804671`](https://github.com/pngwn/MDsveX/commit/e804671afb412c81ce5cb38c40588257d34ab99d), [`e804671`](https://github.com/pngwn/MDsveX/commit/e804671afb412c81ce5cb38c40588257d34ab99d), [`2f981d8`](https://github.com/pngwn/MDsveX/commit/2f981d84b04a718dae82f79e6a9243868444f88c), [`cfee8d1`](https://github.com/pngwn/MDsveX/commit/cfee8d1a968ac78329e314650c51785968bf1dff), [`6f4a27d`](https://github.com/pngwn/MDsveX/commit/6f4a27da11241056ef4912618cefee521525a82a), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`65c9784`](https://github.com/pngwn/MDsveX/commit/65c9784b51209c7706eebaada3e9908bda9d5fa4), [`31aa6e2`](https://github.com/pngwn/MDsveX/commit/31aa6e20390c6fa656845add1d19e0439dda48c7), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`98a1b87`](https://github.com/pngwn/MDsveX/commit/98a1b87b1c45f192c93bf3b910d6ebc8284b94f4), [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`29b6dd1`](https://github.com/pngwn/MDsveX/commit/29b6dd127efc0d00dff650d320d4d003f6d2b1b6), [`31aa6e2`](https://github.com/pngwn/MDsveX/commit/31aa6e20390c6fa656845add1d19e0439dda48c7), [`9903c3a`](https://github.com/pngwn/MDsveX/commit/9903c3ad8d764085285486816736c4f3ea140a99), [`7e69d52`](https://github.com/pngwn/MDsveX/commit/7e69d52284e20892752041fb42726480d88cf31c), [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4), [`31aa6e2`](https://github.com/pngwn/MDsveX/commit/31aa6e20390c6fa656845add1d19e0439dda48c7), [`e804671`](https://github.com/pngwn/MDsveX/commit/e804671afb412c81ce5cb38c40588257d34ab99d), [`98a1b87`](https://github.com/pngwn/MDsveX/commit/98a1b87b1c45f192c93bf3b910d6ebc8284b94f4), [`f2e4911`](https://github.com/pngwn/MDsveX/commit/f2e4911db89f7c66f684c0da839deeb3bc46fa55), [`e804671`](https://github.com/pngwn/MDsveX/commit/e804671afb412c81ce5cb38c40588257d34ab99d), [`2f981d8`](https://github.com/pngwn/MDsveX/commit/2f981d84b04a718dae82f79e6a9243868444f88c), [`e804671`](https://github.com/pngwn/MDsveX/commit/e804671afb412c81ce5cb38c40588257d34ab99d), [`ed11417`](https://github.com/pngwn/MDsveX/commit/ed11417775290f85a0b14dda03d1c11d48bbd239), [`fd54579`](https://github.com/pngwn/MDsveX/commit/fd5457966ce23d1eb29a7935a550394adf4498e4), [`60da683`](https://github.com/pngwn/MDsveX/commit/60da68313df11747bdd6235dffc325c30af60cb2), [`430cf34`](https://github.com/pngwn/MDsveX/commit/430cf3493575c706b31b5e02b4c219f4b6ea0569), [`eefaff5`](https://github.com/pngwn/MDsveX/commit/eefaff563e6ce05026f92c03fce21b3ba4bd5e77), [`3f5bbbb`](https://github.com/pngwn/MDsveX/commit/3f5bbbb069ca12e16b3bb96afb60c41362161109), [`60da683`](https://github.com/pngwn/MDsveX/commit/60da68313df11747bdd6235dffc325c30af60cb2), [`65c9784`](https://github.com/pngwn/MDsveX/commit/65c9784b51209c7706eebaada3e9908bda9d5fa4), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`585a698`](https://github.com/pngwn/MDsveX/commit/585a698f25fd0b6160e25bf0022e3cdabde65172), [`9903c3a`](https://github.com/pngwn/MDsveX/commit/9903c3ad8d764085285486816736c4f3ea140a99), [`2f981d8`](https://github.com/pngwn/MDsveX/commit/2f981d84b04a718dae82f79e6a9243868444f88c), [`cbc0029`](https://github.com/pngwn/MDsveX/commit/cbc00291119021655765fd4f4e05d9f4fb320727)]:
|
|
295
|
-
- @mdsvex/parse@1.0.0-next.1
|
|
296
|
-
|
|
297
|
-
### Major Changes
|
|
298
|
-
|
|
299
|
-
- [#795](https://github.com/pngwn/MDsveX/pull/795) [`6ac3826`](https://github.com/pngwn/MDsveX/commit/6ac382615eb410230e8423d5ca4202005588869e) Thanks [@pngwn](https://github.com/pngwn)! - Add new PFM parser, renderers
|
|
300
|
-
|
|
301
|
-
### Minor Changes
|
|
302
|
-
|
|
303
|
-
- [#798](https://github.com/pngwn/MDsveX/pull/798) [`e5b7abe`](https://github.com/pngwn/MDsveX/commit/e5b7abe1ebf868b1df1e934fb96e1e363696f3e9) Thanks [@pngwn](https://github.com/pngwn)! - Add plugin system and autolink plugin
|
|
304
|
-
|
|
305
|
-
- [#799](https://github.com/pngwn/MDsveX/pull/799) [`5b54692`](https://github.com/pngwn/MDsveX/commit/5b54692d6c895f02c947ce620a46c7a9beb856e9) Thanks [@pngwn](https://github.com/pngwn)! - Add language tools
|
|
306
|
-
|
|
307
|
-
### Patch Changes
|
|
308
|
-
|
|
309
|
-
- Updated dependencies [[`6ac3826`](https://github.com/pngwn/MDsveX/commit/6ac382615eb410230e8423d5ca4202005588869e), [`46f655f`](https://github.com/pngwn/MDsveX/commit/46f655f90a838726eda34e1b07667e86fa61e7cb), [`e5b7abe`](https://github.com/pngwn/MDsveX/commit/e5b7abe1ebf868b1df1e934fb96e1e363696f3e9), [`5b54692`](https://github.com/pngwn/MDsveX/commit/5b54692d6c895f02c947ce620a46c7a9beb856e9)]:
|
|
310
|
-
- @mdsvex/parse@1.0.0-next.0
|