Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
367 B

#!/usr/bin/env perl
# un-htmlify certain things in old DigitalOcean tutorials
# primitive af
use strict;
use warnings;
use 5.10.0;
my $text;
{
# line separator:
local $/ = undef;
$text = <>;
}
$text =~ s{<pre>(.*?)</pre>}{```$1```}gs;
$text =~ s{<span class="highlight">(.*?)</span>}{<^>$1<^>}gs;
$text =~ s{&gt;}{>}gs;
$text =~ s{&lt;}{<}gs;
print $text;