non-admonition callout fix
| | |
| | | import http from "http" |
| | | import serveHandler from "serve-handler" |
| | | import { WebSocketServer } from "ws" |
| | | import { randomUUID } from "crypto" |
| | | |
| | | const ORIGIN_NAME = "origin" |
| | | const UPSTREAM_NAME = "upstream" |
| | |
| | | jsxImportSource: "preact", |
| | | packages: "external", |
| | | metafile: true, |
| | | sourcemap: true, |
| | | sourcemap: "inline", |
| | | sourcesContent: false, |
| | | plugins: [ |
| | | sassPlugin({ |
| | | type: "css-text", |
| | |
| | | } |
| | | |
| | | // bypass module cache |
| | | const { default: buildQuartz } = await import(cacheFile + `?update=${new Date()}`) |
| | | const { default: buildQuartz } = await import(cacheFile + `?update=${randomUUID()}`) |
| | | await buildQuartz(argv, clientRefresh) |
| | | clientRefresh() |
| | | } |
| | |
| | | |
| | | function canonicalizeCallout(calloutName: string): keyof typeof callouts { |
| | | let callout = calloutName.toLowerCase() as keyof typeof calloutMapping |
| | | return calloutMapping[callout] |
| | | return calloutMapping[callout] ?? calloutName |
| | | } |
| | | |
| | | const capitalize = (s: string): string => { |