rn-shiki 0.0.37-32 → 0.0.37-34

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-32",
4
+ "version": "0.0.37-34",
5
5
  "description": "Shiki syntax highlighter for React Native.",
6
6
  "author": "Ryan Skinner <hello@ryanskinner.com>",
7
7
  "license": "MIT",
@@ -60,7 +60,7 @@ const baseStyles = StyleSheet.create({
60
60
  },
61
61
  })
62
62
 
63
- const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({ text, language, languageId, theme, fontSize = 14, showLineNumbers = false }) => {
63
+ const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({ text, language, languageId, theme, fontSize = 14 }) => {
64
64
  const stylesheet = useMemo(() => {
65
65
  const themeRegistration = getThemeRegistration(theme)
66
66
  const styles = getRNStylesFromShikiStyle(themeRegistration)
@@ -117,7 +117,6 @@ const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({ text, language, l
117
117
 
118
118
  const renderLine = (line: ThemedToken[], lineIndex: number) => (
119
119
  <View key={lineIndex} style={baseStyles.lineContainer}>
120
- {showLineNumbers && <Text style={stylesheet.lineNumber}>{(lineIndex + 1).toString()}</Text>}
121
120
  <View style={baseStyles.line}>{line.map((token, tokenIndex) => renderToken(token, tokenIndex))}</View>
122
121
  </View>
123
122
  )