-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
Description
Hi All,
Thanks for this amazing library.
I'm having hard time understanding why it is not able to parse the strings below:
@@ -7,6 +7,9 @@ stages:
# - scan
- deploy
+include:
+ - template: depl/config.yml
+
unit tests:
image: maven:3-jdk-8
stage: test
@@ -7,6 +7,9 @@ stages:
# - scan
- deploy
+include:
+ - template: depl/config-2.yml
+
unit tests:
image: maven:3-jdk-8
stage: test
I keep getting the error as shown on the screenshot below:
What am I missing please? Below is my implementation
type ChangesProps = {
diffs: DiffType[]
}
export const Changes: React.FC<ChangesProps> = ({ diffs }) => {
return (
<React.Fragment>
{diffs.map((diffObj, index) => {
const diffText = diffObj.diff;
console.log(diffText)
const files = parseDiff(diffText) // Error thrown here.
console.log({files})
const renderFile = ({ oldRevision, newRevision, type, hunks }) => (
<Diff key={oldRevision + '-' + newRevision} viewType="unified" diffType={type} hunks={hunks}>
{hunks => hunks.map(hunk => <Hunk key={hunk.content} hunk={hunk} />)}
</Diff>
)
return (
<div key={index}>
{files.map(renderFile)}
</div>
)
})}
</React.Fragment>
)
}
