Can we just use a regex here? /^---\r?\n/