From 6d39d67bc90e2a6e4cd22539be270f246069e64a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 3 Jan 2015 22:33:08 -0800 Subject: Rewrote spec2md in python. Better to only require python, not python and perl. --- spec2md.pl | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 spec2md.pl (limited to 'spec2md.pl') diff --git a/spec2md.pl b/spec2md.pl deleted file mode 100644 index 313f86f..0000000 --- a/spec2md.pl +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; - -my $stage = 0; -my $example = 0; -my @match; -my $section = ""; - -while () { - if (/^\.$/) { - if ($stage == 0) { - $example++; - print "\n
\n"; - print "\n\n"; - print "````````````````````````````````````````````````````````` markdown\n"; - } elsif ($stage == 1) { - print "`````````````````````````````````````````````````````````\n\n"; - print "````````````````````````````````````````````````````````` html\n"; - } elsif ($stage == 2) { - print "`````````````````````````````````````````````````````````\n\n"; - print "
\n\n"; - } else { - die "Encountered unknown stage $stage"; - } - $stage = ($stage + 1) % 3; - } else { - if ($stage == 0 && (@match = ($_ =~ /^#{1,6} *(.*)/))) { - $section = $match[0]; - } - if ($stage != 0) { - $_ =~ s/ /␣/g; - } - print $_; - } -} -- cgit v1.2.3