Compare commits
2
Commits
8ca84e0564
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2f218b8de | ||
|
|
a249b32b7d |
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
VITE_SITE_URL=http://localhost:5173
|
||||||
@@ -3,6 +3,13 @@ import MarkdownIt from 'markdown-it';
|
|||||||
import { EventSchema } from './event-schema';
|
import { EventSchema } from './event-schema';
|
||||||
import type { EventData, EventMetadata } from '../types/event';
|
import type { EventData, EventMetadata } from '../types/event';
|
||||||
|
|
||||||
|
// gray-matter casts the source with Buffer.from() on every parse, and browsers have
|
||||||
|
// no Buffer, so without this the client throws before the app mounts. The result is
|
||||||
|
// only kept as an unused `orig` field, so a plain string stands in for it.
|
||||||
|
if (typeof globalThis.Buffer === 'undefined') {
|
||||||
|
(globalThis as { Buffer?: unknown }).Buffer = { from: (value: string) => value };
|
||||||
|
}
|
||||||
|
|
||||||
const markdown = new MarkdownIt({ html: false, linkify: true, typographer: true });
|
const markdown = new MarkdownIt({ html: false, linkify: true, typographer: true });
|
||||||
|
|
||||||
export function parseEventSource(source: string, sourceName = 'event'): EventData {
|
export function parseEventSource(source: string, sourceName = 'event'): EventData {
|
||||||
|
|||||||
Reference in new issue
Block a user