Skip to content

Multiple themes break @shikijs/transformers #248

@Serpentarius13

Description

@Serpentarius13

When using such options:

const prettyCodeOptions: Options = {
  transformers: [transformerNotationDiff(), transformerNotationHighlight({})],
  getHighlighter: (options) => {
    return createHighlighter({
      ...options,
    });
  },
  theme: {
    dark: "night-owl",
    light: "ayu-dark",
  },
};

Regexp matching breaks in transformers leaving the code untransformed:
image
There is no way now to apply multiple theme tokens as per shiki's docs because of it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions