@shikijs/core 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -729,7 +729,7 @@ function codeToTokens(primitive, code, options) {
729
729
  theme: i[1]
730
730
  })).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);
731
731
  if (themes.length === 0) throw new ShikiError$1("`themes` option must not be empty");
732
- const themeTokens = codeToTokensWithThemes$1(primitive, code, options);
732
+ const themeTokens = codeToTokensWithThemes$1(primitive, code, options, codeToTokensBase);
733
733
  grammarState = getLastGrammarStateFromMap(themeTokens);
734
734
  if (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError$1(`\`themes\` option must contain the defaultColor key \`${defaultColor}\``);
735
735
  const themeRegs = themes.map((t) => primitive.getTheme(t.theme));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/core",
3
3
  "type": "module",
4
- "version": "4.0.1",
4
+ "version": "4.0.2",
5
5
  "description": "Core of Shiki",
6
6
  "author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -49,8 +49,8 @@
49
49
  "@shikijs/vscode-textmate": "^10.0.2",
50
50
  "@types/hast": "^3.0.4",
51
51
  "hast-util-to-html": "^9.0.5",
52
- "@shikijs/primitive": "4.0.1",
53
- "@shikijs/types": "4.0.1"
52
+ "@shikijs/primitive": "4.0.2",
53
+ "@shikijs/types": "4.0.2"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "tsdown",