Re:GitHub satanically messing with Markdown – changes 666 to...
by CarlRJ on Tuesday November 26, 2019 @11:32AM
(#21639780)
> Though, and at risk of re-igniting old flamewars, I always preferred vi to emacs even despite having a fondness for LISP.
That's because vi is a better text editor (as the old saw goes, emacs is a nice OS, but it lacks a decent text editor.)
The key words I used were "most" and "simple". I'm well aware of the pitfalls of regex and have seen many horror stories myself but I'm not talking about parsing HTML nor other complex documents and nor am I suggesting you write the entire parser in regex. I'm talking about simple find and replaces for common static tags when you're only supporting a subset of BBcode. eg:
(https://play.golang.org/p/GK7OGt2mHb6)You could even use string find/replace but that wouldn't capture missing closing tags.
Things obviously get more complicated if you want to support some of the BBCode supersets like:
...but by that point you're dealing with a reasonably competent contributor who might feel better at home with markdown anyway (I know I would).> And this piece of computer trivia archeology http://regex.info/blog/2006-09-15/247
Doesn't feel much like archaeology to me because I used to work a lot in Perl in the late 90s and 00s :) Though, and at risk of re-igniting old flamewars, I always preferred vi to emacs even despite having a fondness for LISP.