Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
probation-integration-bot[bot] authored Oct 16, 2024
1 parent 65cfc52 commit 81c2bb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ class SentenceIntegrationTest {
LocalDate.now(),
listOf(
LicenceConditionNote(
note = "He shall not contact or associate with Peter Jones without the prior approval of the supervising officer;",
hasNotesBeenTruncated = false)
note = "He shall not contact or associate with Peter Jones without the prior approval of the supervising officer;",
hasNotesBeenTruncated = false
)
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ class SentenceService(

notes?.let {
val splitParam = "---------------------------------------------------------" + System.lineSeparator()
return notes.split(splitParam).map {
note ->
val addedBy = Regex("^Comment added by .+? on \\d{2}\\/\\d{2}\\/\\d{4} at \\d{2}:\\d{2}"
+ System.lineSeparator()).find(note)?.value
return notes.split(splitParam).map { note ->
val addedBy = Regex(
"^Comment added by .+? on \\d{2}\\/\\d{2}\\/\\d{4} at \\d{2}:\\d{2}"
+ System.lineSeparator()
).find(note)?.value
val noteText = addedBy?.let { note.removePrefix(addedBy) } ?: note

LicenceConditionNote(
Expand Down

0 comments on commit 81c2bb6

Please sign in to comment.