Jacky Zhao
2023-07-02 e0ebee5aa9b3646de722f139f1d8d15591df538e
quartz/plugins/transformers/syntax.ts
@@ -3,9 +3,6 @@
export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
  name: "SyntaxHighlighting",
  markdownPlugins() {
    return []
  },
  htmlPlugins() {
    return [[rehypePrettyCode, {
      theme: 'css-variables',
@@ -15,10 +12,12 @@
        }
      },
      onVisitHighlightedLine(node) {
        node.properties.className ??= []
        node.properties.className.push('highlighted')
      },
      onVisitHighlightedWord(node) {
        node.properties.className = ['word']
        node.properties.className ??= []
        node.properties.className.push('word')
      },
    } satisfies Partial<CodeOptions>]]
  }