Skip to content

Commit

Permalink
fix: replace newline with space and trim spaces (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
grudra7714 authored Sep 17, 2024
1 parent 132fef8 commit da30799
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/generate-raid.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ func readData() (data ComponentDefinition, err error) {
data.Controls[i].IDFriendly = strings.ReplaceAll(data.Controls[i].ID, ".", "_")
// loop over objectives in test_requirements and replace newlines with empty string
for k, v := range data.Controls[i].TestRequirements {
data.Controls[i].TestRequirements[k] = strings.Replace(v, "\n", "", -1)
data.Controls[i].TestRequirements[k] = strings.TrimSpace(strings.ReplaceAll(v, "\n", " "))
}

}
return
}
Expand Down

0 comments on commit da30799

Please sign in to comment.