markup converter progress

2023-03-12 23:56

yep. this is a another late-night blog post. probably won't be a long one, but that's okay, i don't aim to post at a specific length when i write, i just kind of write how i want and when my brain wants to throw text into the world's eyes to read.

anyway, i updated my markup parser so i can split ordered and unordered list items across multiple lines. it was beginning to feel odd to have a text file that was 80 characters in width, and then like a 120 character-long line in the middle of it because my markup converter didn't support multi-line list items lol.

it wasn't too hard either, i basically just needed to remove the </li> that i appended to the end of the line when parsing lists, and, instead, add it when a new hyphen occured at the beginning of a line, when there were no more lines to parse and the parser was in an 'ordered-list or 'unordered-list state, or when the current line was just whitespace.

you can snoop around this file for the word "multiline" if you want to see how i did it.