circe / circe-yaml

YAML parser for circe using SnakeYAML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Split long urls to new line

LBsh opened this issue · comments

commented

version: 0.13.0

command

import cats.syntax.either._
import io.circe.yaml._
import io.circe.yaml.syntax._

val json = io.circe.jawn.parse("""{"foo":{"description": "hello, this is a random url on circe repo. Please check this file https://github.com/circe/circe-yaml/blob/master/src/main/scala/io/circe/yaml/parser/package.scala"}}""").valueOr(throw _)
io.circe.yaml.Printer().pretty(json)

actual

"foo:
  description: hello, this is a random url on circe repo. Please check this file https://github.com/circe/circe-yaml/blob/master/src/main/scala/io/circe/yaml/parser/package.scala
"

expected

"foo:
  description: hello, this is a random url on circe repo. Please check this file 
  https://github.com/circe/circe-yaml/blob/master/src/main/scala/io/circe/yaml/parser/package.scala
"

This url exceeds 80 characters (the default max column) but is treated somehow as a single character so it stays in 1 line.
could we make it split to a new line?