git.m455.casa

m455.casa

clone url: git://git.m455.casa/m455.casa


posts/markup-converter-progress.txt

1 title: markup converter progress
2
3 2023-03-12 23:56
4
5 yep. this is a another late-night blog post. probably won't be a long one, but
6 that's okay, i don't aim to post at a specific length when i write, i just kind
7 of write how i want and when my brain wants to throw text into the world's eyes
8 to read.
9
10 anyway, i updated my markup parser so i can split ordered and unordered list
11 items across multiple lines. it was beginning to feel odd to have a text file
12 that was 80 characters in width, and then like a 120 character-long line in the
13 middle of it because my markup converter didn't support multi-line list items
14 lol.
15
16 it wasn't too hard either, i basically just needed to remove the `</li>` that i
17 appended to the end of the line when parsing lists, and, instead, add it when a
18 new hyphen occured at the beginning of a line, when there were no more lines to
19 parse and the parser was in an `'ordered-list` or `'unordered-list` state, or
20 when the current line was just whitespace.
21
22 you can snoop around
23 [https://git.m455.casa/m455.casa/html/src/parser.scm.html|this file]
24 for the word "multiline" if you want to see how i did it.