X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/8149be213f1c8f52b0dbe6c213f6073af57fa954..b431282c91deea24916578395d88084261410968:/filters/html-converters/resources/markdown.pl diff --git a/filters/html-converters/resources/markdown.pl b/filters/html-converters/resources/markdown.pl index abec173..4c39808 100755 --- a/filters/html-converters/resources/markdown.pl +++ b/filters/html-converters/resources/markdown.pl @@ -18,10 +18,6 @@ use vars qw($VERSION); $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: @@ -40,7 +36,7 @@ my $g_nested_brackets; $g_nested_brackets = qr{ (?> # Atomic matching [^\[\]]+ # Anything other than brackets - | + | \[ (??{ $g_nested_brackets }) # Recursive set of nested brackets \] @@ -129,7 +125,7 @@ unless ($@) { 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', ''); @@ -164,7 +160,7 @@ unless ($@) { 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 = ">"; } @@ -651,7 +647,7 @@ sub _HashHTMLBlocks { "\n\n" . $key . "\n\n"; }egmx; # Special case just for
` blocks.
-#
+#
my $text = shift;
@@ -1231,26 +1227,26 @@ sub _DoCodeBlocks {
sub _DoCodeSpans {
#
# * Backtick quotes are used for 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:
-#
+#
# Just type foo `bar` baz at the prompt.
-#
+#
# 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 `bar` ...
#
@@ -1291,7 +1287,7 @@ sub _EncodeCode {
{
no warnings 'once';
if (defined($blosxom::version)) {
- s/\$/$/g;
+ s/\$/$/g;
}
}
@@ -1697,8 +1693,8 @@ See the readme file for detailed release notes for this version.
=head1 COPYRIGHT AND LICENSE
-Copyright (c) 2003-2004 John Gruber
-
+Copyright (c) 2003-2004 John Gruber
+
All rights reserved.
Redistribution and use in source and binary forms, with or without