Solution: Completely restructure the parsing file to use mostly just Regex.
Before:
File would parse line by line
Use minimal regex to determine how to display info in line
After:
File parses in chunks based on regex
Iterates over multiple similar chunks
Uses a lot of regex to refine search on those chunks
Note: I wanted to add some extra stuff, but I feel like it's best to push something that works, rather than try and perfect it. I modified the test a bit. My code passes the test now. I would still like someone to review with me and make sure I've covered all the defaults. I'm afraid that not everything has been covered in the test, and so I may have missed something.
Issue: https://github.com/JustUtahCoders/utahexpungements.org/issues/174
Problem: Parser doesn't always parse what's needed.
Solution: Completely restructure the parsing file to use mostly just Regex.
Before:
After:
Note: I wanted to add some extra stuff, but I feel like it's best to push something that works, rather than try and perfect it. I modified the test a bit. My code passes the test now. I would still like someone to review with me and make sure I've covered all the defaults. I'm afraid that not everything has been covered in the test, and so I may have missed something.