react-diff-view
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -21,7 +21,13 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
function isEmptyToken(tokens) { | ||
if (!Array.isArray(tokens)) { | ||
return true; | ||
} | ||
if (tokens.length > 1) { | ||
return false; | ||
} | ||
const [token] = tokens; | ||
return token.type === 'text' && !token.value; | ||
if (tokens.length === 1) { | ||
const [token] = tokens; | ||
return token.type === 'text' && !token.value; | ||
} | ||
return true; | ||
} | ||
@@ -28,0 +34,0 @@ function CodeCell(props) { |
{ | ||
"name": "react-diff-view", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "A git diff component to consume the git unified diff output.", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
@@ -269,4 +269,5 @@ # react-diff-view | ||
For a more complex case, you can reference the example in [demo/File.js](demo/File.js) about implementing code comments with the `widgets` prop. | ||
For a more complex case, you can reference the example in [site/components/DiffView/index.tsx](https://github.com/otakustay/react-diff-view/blob/20241a0f2d7fc58d10e65063fd695a78f77c265d/site/components/DiffView/index.tsx#L137) about implementing code comments with the `widgets` prop. | ||
## Customize styles | ||
@@ -273,0 +274,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1297392
4261
780