rn-shiki 0.0.37-17 → 0.0.37-19

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rn-shiki",
3
3
  "type": "module",
4
- "version": "0.0.37-17",
4
+ "version": "0.0.37-19",
5
5
  "description": "Shiki syntax highlighter for React Native.",
6
6
  "author": "Ryan Skinner <hello@ryanskinner.com>",
7
7
  "license": "MIT",
@@ -45,10 +45,10 @@ const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({ text, language, l
45
45
  ...tokenStylesArray,
46
46
  {
47
47
  fontFamily: monospaceFont,
48
+ ...(token.color && { color: token.color }),
49
+ ...(token.fontStyle === 'italic' && stylesheet.italic),
50
+ ...(token.fontWeight === 'bold' && stylesheet.bold),
48
51
  },
49
- ...(token.color && { color: token.color }),
50
- ...(token.fontStyle === 'italic' ? [{ fontStyle: 'italic' }] : []),
51
- ...(token.fontStyle === 'bold' ? [{ fontWeight: 'bold' }] : []),
52
52
  ])
53
53
 
54
54
  console.log(`Rendering token: ${token.content}, styles:`, combinedStyles)