Skip to content

Commit

Permalink
Merge pull request #12 from j-mie6/debug-fix
Browse files Browse the repository at this point in the history
Fixed dodgy toString in debug combinator
  • Loading branch information
j-mie6 authored Dec 8, 2020
2 parents e9883d1 + 30d0b2d commit 7d996c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/parsley/instructions/CoreInstrs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ private [instructions] trait Logger
val indent = this.indent(ctx)
val start = Math.max(ctx.offset - 5, 0)
val end = Math.min(ctx.offset + 6, ctx.inputsz)
val input = ctx.input.toString.substring(start, end).replace("\n", Console.GREEN + "" + Console.RESET)
val input = ctx.input.mkString.substring(start, end).replace("\n", Console.GREEN + "" + Console.RESET)
.replace(" ", Console.WHITE + "·" + Console.RESET)
val inputAndEof = if (end == ctx.inputsz) input + Console.RED + "" + Console.RESET else input
val prelude = s"$indent$dir$name$dir (${ctx.line}, ${ctx.col}): "
Expand Down

0 comments on commit 7d996c6

Please sign in to comment.