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
@@ -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
|
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
|
)
|