Skip to content

Commit 55e857b

Browse files
authoredJul 23, 2024··
fix: codeToTokens's includeExplanation option (#718)
1 parent c8f301c commit 55e857b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎packages/core/src/code-to-tokens-themes.ts

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export function codeToTokensWithThemes(
3434
offset: _token.offset,
3535
}
3636

37+
if ('includeExplanation' in options && options.includeExplanation) {
38+
mergedToken.explanation = _token.explanation
39+
}
40+
3741
tokens.forEach((t, themeIdx) => {
3842
const {
3943
content: _,

0 commit comments

Comments
 (0)
Please sign in to comment.