non-admonition callout fix

This commit is contained in:
Jacky Zhao 2023-08-05 16:43:50 -07:00
parent b0cb764dd1
commit e93a5956e7
2 changed files with 5 additions and 3 deletions

View File

@ -16,6 +16,7 @@ import { transform as cssTransform } from "lightningcss"
import http from "http" import http from "http"
import serveHandler from "serve-handler" import serveHandler from "serve-handler"
import { WebSocketServer } from "ws" import { WebSocketServer } from "ws"
import { randomUUID } from "crypto"
const ORIGIN_NAME = "origin" const ORIGIN_NAME = "origin"
const UPSTREAM_NAME = "upstream" const UPSTREAM_NAME = "upstream"
@ -304,7 +305,8 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
jsxImportSource: "preact", jsxImportSource: "preact",
packages: "external", packages: "external",
metafile: true, metafile: true,
sourcemap: true, sourcemap: "inline",
sourcesContent: false,
plugins: [ plugins: [
sassPlugin({ sassPlugin({
type: "css-text", type: "css-text",
@ -372,7 +374,7 @@ See the [documentation](https://quartz.jzhao.xyz) for how to get started.
} }
// bypass module cache // bypass module cache
const { default: buildQuartz } = await import(cacheFile + `?update=${new Date()}`) const { default: buildQuartz } = await import(cacheFile + `?update=${randomUUID()}`)
await buildQuartz(argv, clientRefresh) await buildQuartz(argv, clientRefresh)
clientRefresh() clientRefresh()
} }

View File

@ -96,7 +96,7 @@ const calloutMapping: Record<string, keyof typeof callouts> = {
function canonicalizeCallout(calloutName: string): keyof typeof callouts { function canonicalizeCallout(calloutName: string): keyof typeof callouts {
let callout = calloutName.toLowerCase() as keyof typeof calloutMapping let callout = calloutName.toLowerCase() as keyof typeof calloutMapping
return calloutMapping[callout] return calloutMapping[callout] ?? calloutName
} }
const capitalize = (s: string): string => { const capitalize = (s: string): string => {