Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SRT parser sans validation.
let srtParser = Many(srtGroupParser, separator: Newline().skip(Newline())) // `separator` mirrors
// the blank line handling in `srtGroupParser`, while tucking away the explicit `\n` and `\r\n`
// logic — https://github.com/pointfreeco/swift-parsing/blob/dd2e6f2e8e7ca0211e81bf790044a314602fd7dd/Sources/Parsing/Parsers/Newline.swift#L14-L20
.skip(End())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment