|
|
- #!/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{>}{>}gs;
- $text =~ s{<}{<}gs;
-
- print $text;
|