Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active Jan 25, 2021
Embed
What would you like to do?
Start of an SRT subtitle group parser.
let srtGroupParser = Int.parser(isSigned: false) // The sequence number.
.skip(Newline()) // ❌ “Generic struct ‘Newline’ requires the types ‘Substring.Element’
// (aka ‘Character’) and ‘UTF8.CodeUnit’ (aka ‘UInt8’) be equivalent.”
.take(timecodeLineParser)
.skip(Newline())
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment