Plain Text text at sdfeu.org
Wed Oct 13 22:12:03 BST 2021
- - - - - - - - - - - - - - - - - - -
On Mon, 11 Oct 2021 15:15:44 +0000, Plain Text wrote:
https://gemini.circumlunar.space/docs/specification.gmi
My try on identifying line types using Python re named groups what became a quite unreadable line, also missing ```, sorry.
line.py import re, sys for line in sys.stdin: m = re.match(r'((?P<heads>(?P<h3>###)|(?P<h2>##)|(?P<h1>#))|(?P<list>\* )|(?P<link>=
(?P<url>[^\s]+))|(?P<quote>
))\s*(?P<content>.*)