@shikijs/core 1.10.3 → 1.11.1

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 +3 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -770,6 +770,9 @@ function codeToTokensWithThemes(internal, code, options) {
770
770
  variants: {},
771
771
  offset: _token.offset,
772
772
  };
773
+ if ('includeExplanation' in options && options.includeExplanation) {
774
+ mergedToken.explanation = _token.explanation;
775
+ }
773
776
  tokens.forEach((t, themeIdx) => {
774
777
  const { content: _, explanation: __, offset: ___, ...styles } = t[lineIdx][tokenIdx];
775
778
  mergedToken.variants[themes[themeIdx].color] = styles;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/core",
3
3
  "type": "module",
4
- "version": "1.10.3",
4
+ "version": "1.11.1",
5
5
  "description": "Core of Shiki",
6
6
  "author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",