Skip to content

Commit

Permalink
more fuzzy matching on error modications - fixes #438
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed Jul 26, 2024
1 parent 0f7fd59 commit b963910
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/scala/mdoc/ErrorMessageManipulation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ object ErrorMessageManipulation {
.mkString("\n")
.replace("java.lang.Exception", "Exception")
.replace("Result: Defect: Exception:", "Defect:")
.replace("error: ", "error:") // dunno why on some there is a trailing space
.replace(effectCantFailMsg, effectCantFailMsgSimple)
.replace(canOnlyCallRunOnZiosMsg, canOnlyCallRunOnZiosMsgSimple)
.replace(
Expand All @@ -79,6 +80,8 @@ object ErrorMessageManipulation {
"Please provide a layer for the following type",
"Please provide a layer for"
)


val pattern = Pattern.compile("─────────────────────────────(.*?)```", Pattern.DOTALL)
val matcher = pattern.matcher(almostClean)
matcher.replaceAll("─────────────────────────────\n```")
Expand Down

0 comments on commit b963910

Please sign in to comment.