Jacky Zhao
2023-08-06 a0d651d64dfd766157324fd86791da2168028cf2
quartz/plugins/transformers/ofm.ts
@@ -96,7 +96,7 @@
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 => {
@@ -184,7 +184,7 @@
              // embed cases
              if (value.startsWith("!")) {
                const ext: string | undefined = path.extname(fp).toLowerCase()
                const ext: string = path.extname(fp).toLowerCase()
                const url = slugifyFilePath(fp as FilePath) + ext
                if ([".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].includes(ext)) {
                  const dims = alias ?? ""
@@ -218,8 +218,8 @@
                    type: "html",
                    value: `<iframe src="${url}"></iframe>`,
                  }
                } else {
                  // TODO: this is the node embed case
                } else if (ext === "") {
                  // TODO: note embed
                }
                // otherwise, fall through to regular link
              }