$VERSION = '1.0.1';
# Tue 14 Dec 2004
-## Disabled; causes problems under Perl 5.6.1:
-use utf8;
-binmode( STDOUT, ":utf8" ); # c.f.: http://acis.openlib.org/dev/perl-unicode-struggle.html
-
#
# Global default settings:
$g_nested_brackets = qr{
(?> # Atomic matching
[^\[\]]+ # Anything other than brackets
- |
+ |
\[
(??{ $g_nested_brackets }) # Recursive set of nested brackets
\]
my $ctx = shift;
my $raw = 0;
if (defined $ctx) {
- my $output = $ctx->stash('markdown_output');
+ my $output = $ctx->stash('markdown_output');
if (defined $output && $output =~ m/^html/i) {
$g_empty_element_suffix = ">";
$ctx->stash('markdown_output', '');
my $text = shift;
my $ctx = shift;
if (defined $ctx) {
- my $output = $ctx->stash('markdown_output');
+ my $output = $ctx->stash('markdown_output');
if (defined $output && $output eq 'html') {
$g_empty_element_suffix = ">";
}
"\n\n" . $key . "\n\n";
}egmx;
# Special case just for <hr />. It was easier to make a special case than
- # to make the other regex more complicated.
+ # to make the other regex more complicated.
$text =~ s{
(?:
(?<=\n\n) # Starting after a blank line
[ ]{0,$less_than_tab}
<(hr) # start tag = $2
\b # word break
- ([^<>])*? #
+ ([^<>])*? #
/?> # the matching end tag
[ \t]*
(?=\n{2,}|\Z) # followed by a blank line or end of document
# Setext-style headers:
# Header 1
# ========
- #
+ #
# Header 2
# --------
#
sub _DoCodeBlocks {
#
# Process Markdown `<pre><code>` blocks.
-#
+#
my $text = shift;
sub _DoCodeSpans {
#
# * Backtick quotes are used for <code></code> spans.
-#
+#
# * You can use multiple backticks as the delimiters if you want to
# include literal backticks in the code span. So, this input:
-#
+#
# Just type ``foo `bar` baz`` at the prompt.
-#
+#
# Will translate to:
-#
+#
# <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
-#
+#
# There's no arbitrary limit to the number of backticks you
# can use as delimters. If you need three consecutive backticks
# in your code, use four for delimiters, etc.
#
# * You can use spaces to get literal backticks at the edges:
-#
+#
# ... type `` `bar` `` ...
-#
+#
# Turns to:
-#
+#
# ... type <code>`bar`</code> ...
#
{
no warnings 'once';
if (defined($blosxom::version)) {
- s/\$/$/g;
+ s/\$/$/g;
}
}
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2003-2004 John Gruber
-<http://daringfireball.net/>
+Copyright (c) 2003-2004 John Gruber
+<http://daringfireball.net/>
All rights reserved.
Redistribution and use in source and binary forms, with or without