--- markdown-1.0.1.orig/debian/copyright
+++ markdown-1.0.1/debian/copyright
@@ -0,0 +1,36 @@
+The Markdown sources were downloaded from
+http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip.
+
+Markdown was written by John Gruber. The Debian package was created
+by Matt Kraai.
+
+ Copyright (c) 2004, John Gruber
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name "Markdown" nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ This software is provided by the copyright holders and contributors "as
+ is" and any express or implied warranties, including, but not limited
+ to, the implied warranties of merchantability and fitness for a
+ particular purpose are disclaimed. In no event shall the copyright owner
+ or contributors be liable for any direct, indirect, incidental, special,
+ exemplary, or consequential damages (including, but not limited to,
+ procurement of substitute goods or services; loss of use, data, or
+ profits; or business interruption) however caused and on any theory of
+ liability, whether in contract, strict liability, or tort (including
+ negligence or otherwise) arising in any way out of the use of this
+ software, even if advised of the possibility of such damage.
--- markdown-1.0.1.orig/debian/control
+++ markdown-1.0.1/debian/control
@@ -0,0 +1,14 @@
+Source: markdown
+Maintainer: Matt Kraai
+Section: web
+Priority: optional
+Standards-Version: 3.7.2
+Homepage: http://daringfireball.net/projects/markdown/
+
+Package: markdown
+Architecture: all
+Depends: perl (>= 5.6.0-0.1)
+Description: Text-to-HTML conversion tool
+ Markdown is a text-to-HTML conversion tool for web writers. It
+ allows you to write using an easy-to-read, easy-to-write plain text
+ format, then convert it to structurally valid XHTML (or HTML).
--- markdown-1.0.1.orig/debian/rules
+++ markdown-1.0.1/debian/rules
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+
+binary: binary-indep
+
+binary-arch:
+
+binary-indep:
+ install -d debian/tmp/usr/bin debian/tmp/usr/share/perl5/Text
+ install Markdown.pl debian/tmp/usr/bin/markdown
+ ln -sf ../../../bin/markdown \
+ debian/tmp/usr/share/perl5/Text/Markdown.pm
+
+ install -d debian/tmp/usr/share/man/man1
+ install -d debian/tmp/usr/share/man/man3
+ install -m 644 markdown.1 debian/tmp/usr/share/man/man1/markdown.1
+ gzip -9 debian/tmp/usr/share/man/man1/markdown.1
+ ln -sf ../man1/markdown.1.gz \
+ debian/tmp/usr/share/man/man3/Markdown.3.gz
+
+ install -d debian/tmp/usr/share/doc/markdown
+ install -m 644 debian/changelog \
+ debian/tmp/usr/share/doc/markdown/changelog.Debian
+ gzip -9 debian/tmp/usr/share/doc/markdown/changelog.Debian
+ install -m 644 debian/copyright \
+ debian/tmp/usr/share/doc/markdown/copyright
+
+ install -d debian/tmp/DEBIAN
+ dpkg-gencontrol -isp
+ dpkg-deb --build debian/tmp ..
+
+build: build-indep
+
+build-indep: markdown.1
+
+clean:
+ rm -fr debian/files debian/tmp markdown.1
+
+markdown.1: Markdown.pl
+ pod2man Markdown.pl > markdown.1
+
+.PHONY: binary binary-arch binary-indep build clean
--- markdown-1.0.1.orig/debian/changelog
+++ markdown-1.0.1/debian/changelog
@@ -0,0 +1,55 @@
+markdown (1.0.1-7) unstable; urgency=low
+
+ * Add a Homepage field.
+ * Set the Standards-Version field to 3.7.2.
+ * Add a brief description to the NAME section of the manual page.
+
+ -- Matt Kraai Sun, 02 Dec 2007 10:10:11 -0800
+
+markdown (1.0.1-6) unstable; urgency=low
+
+ * Move Markdown.pm to /usr/share/perl5/Text, thanks to Paul Collins,
+ closes: #402255.
+
+ -- Matt Kraai Sat, 9 Dec 2006 08:59:11 -0800
+
+markdown (1.0.1-5) unstable; urgency=low
+
+ * Change the module name to Text::Markdown, closes: #387687.
+
+ -- Matt Kraai Thu, 7 Dec 2006 04:10:27 -0800
+
+markdown (1.0.1-4) unstable; urgency=low
+
+ * Add a binary-arch target, closes: #395623.
+
+ -- Matt Kraai Thu, 7 Dec 2006 03:39:20 -0800
+
+markdown (1.0.1-3) unstable; urgency=low
+
+ * Make the clean target in debian/rules remove debian/files, reported by
+ Joey Hess.
+ * Behave as a module if used as one, reported and patched by Joey Hess,
+ closes: #356143.
+ * Change the standards version to 3.6.2.2.
+
+ -- Matt Kraai Fri, 10 Mar 2006 04:50:15 -0800
+
+markdown (1.0.1-2) unstable; urgency=low
+
+ * Remove the version history section from the manual page (closes:
+ #285252).
+
+ -- Matt Kraai Sun, 19 Dec 2004 23:11:04 -0800
+
+markdown (1.0.1-1) unstable; urgency=low
+
+ * New release.
+
+ -- Matt Kraai Sun, 19 Dec 2004 08:29:05 -0800
+
+markdown (1.0-1) unstable; urgency=low
+
+ * Package.
+
+ -- Matt Kraai Tue, 19 Oct 2004 05:58:08 -0700
--- markdown-1.0.1.orig/Markdown.pl
+++ markdown-1.0.1/Markdown.pl
@@ -8,7 +8,7 @@
#
-package Markdown;
+package Text::Markdown;
require 5.006_000;
use strict;
use warnings;
@@ -64,6 +64,9 @@
# (see _ProcessListItems() for details):
my $g_list_level = 0;
+# Check to see if Markdown.pm has been loaded; if so we must be loaded
+# as a perl module.
+my $g_perl_module = exists $INC{'Text/Markdown.pm'};
#### Blosxom plug-in interface ##########################################
@@ -87,8 +90,8 @@
#### Movable Type plug-in interface #####################################
-eval {require MT}; # Test to see if we're running in MT.
-unless ($@) {
+eval {require MT} unless $g_perl_module; # Test to see if we're running in MT.
+unless ($g_perl_module || $@) {
require MT;
import MT;
require MT::Template::Context;
@@ -178,7 +181,7 @@
});
}
}
-else {
+elsif (! $g_perl_module) {
#### BBEdit/command-line text filter interface ##########################
# Needs to be hidden from MT (and Blosxom when running in static mode).
@@ -189,7 +192,7 @@
#### Check for command-line switches: #################
my %cli_opts;
- use Getopt::Long;
+ eval {use Getopt::Long}; # don't load in library mode
Getopt::Long::Configure('pass_through');
GetOptions(\%cli_opts,
'version',
@@ -1325,14 +1328,15 @@
=head1 NAME
-B
+B - convert text to HTML
=head1 SYNOPSIS
-B [ B<--html4tags> ] [ B<--version> ] [ B<-shortversion> ]
- [ I ... ]
+B [ B<--html4tags> ] [ B<--version> ] [ B<-shortversion> ] [ I ... ]
+use Markdown;
+$html=Markdown::Markdown($text);
=head1 DESCRIPTION
@@ -1355,7 +1359,7 @@
Use "--" to end switch parsing. For example, to open a file named "-z", use:
- Markdown.pl -- -z
+ markdown -- -z
=over 4
@@ -1396,15 +1400,6 @@
you expected; (3) the output Markdown actually produced.
-=head1 VERSION HISTORY
-
-See the readme file for detailed release notes for this version.
-
-1.0.1 - 14 Dec 2004
-
-1.0 - 28 Aug 2004
-
-
=head1 AUTHOR
John Gruber