From 956318833876499208d54110a08f92a15857993d Mon Sep 17 00:00:00 2001 From: tmcheung <42575345+tmcheung@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:29:13 +0200 Subject: [PATCH] Add missing newline in with1 documentation (#608) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add missing newline in with1 documentation Co-authored-by: Jørgen Valstad jvals@users.noreply.github.com * Remove redundant space * Update Parser.scala --- core/shared/src/main/scala/cats/parse/Parser.scala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/shared/src/main/scala/cats/parse/Parser.scala b/core/shared/src/main/scala/cats/parse/Parser.scala index 656596ed..76584aff 100644 --- a/core/shared/src/main/scala/cats/parse/Parser.scala +++ b/core/shared/src/main/scala/cats/parse/Parser.scala @@ -290,11 +290,17 @@ sealed abstract class Parser0[+A] { self: Product => * * For example, with `p: Parser0[Int]` and `p1: Parser0[Double]`: * - * val a1: Parser0[(Int, Double)] = p ~ p1 val a2: Parser[(Int, Double)] = p.with1 ~ p1 + * val a1: Parser0[(Int, Double)] = p ~ p1 * - * val b1: Parser0[Double] = p *> p1 val b2: Parser[Double] = p.with1 *> p1 + * val a2: Parser[(Int, Double)] = p.with1 ~ p1 * - * val c1: Parser0[Int] = p <* p1 val c2: Parser[Int] = p.with1 <* p1 + * val b1: Parser0[Double] = p *> p1 + * + * val b2: Parser[Double] = p.with1 *> p1 + * + * val c1: Parser0[Int] = p <* p1 + * + * val c2: Parser[Int] = p.with1 <* p1 * * Without using `with1`, these methods will return `Parser0` values since they are not known to * return `Parser` values instead.