Skip to content

Commit

Permalink
Add missing newline in with1 documentation (#608)
Browse files Browse the repository at this point in the history
* Add missing newline in with1 documentation

Co-authored-by: Jørgen Valstad jvals@users.noreply.github.com

* Remove redundant space

* Update Parser.scala
  • Loading branch information
tmcheung authored Sep 25, 2024
1 parent d67114b commit 9563188
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions core/shared/src/main/scala/cats/parse/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9563188

Please sign in to comment.