alopezlago / YetAnotherPacketParser

A parser to convert quiz bowl packets to different file formats
Other
8 stars 0 forks source link

Investigate changing the FormattedTextSegment data structure #18

Open alopezlago opened 3 years ago

alopezlago commented 3 years ago

Right now, we pass around a list of FormattedTextSegments, which have a slice of the string with formatting information. It may be better if we invert this, so we have the string with a list of the formatting changes. This will make certain parsing operations simpler, since we don't need to merge strings together to check what type of line it is, and it makes other search operations (like for a power marker) much easier.