Re:Show HN: Mawkdown – (Toy) Markdown Parser in Awk
by asicsp on Saturday July 18, 2020 @09:24AM
(#23881256)
Nice. Haven't gone through it fully, but the header parsing stood out for improvement. Use match to capture number of '#' characters and use length, for example:
Re:Show HN: Mawkdown – (Toy) Markdown Parser in Awk
by rethab on Saturday July 18, 2020 @11:36AM
(#23882065)
Thanks for the hint. I started with the intention of staying within the limits of "traditional" AWK and only resorted to using match (which is only available on GAWK, for those who don't know) to parse links and images.
As you'll read on, you'll certainly find more areas for improvements, because this is pretty much based on an idea I had in the shower and then typed it out in a hour :)
As you'll read on, you'll certainly find more areas for improvements, because this is pretty much based on an idea I had in the shower and then typed it out in a hour :)
http://code.9front.org/hg/werc/file/2ace198c631b/bin/contrib...