about summary refs log tree commit diff stats
path: root/filters
diff options
context:
space:
mode:
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/html-converters/resources/markdown.pl36
1 files changed, 18 insertions, 18 deletions
diff --git a/filters/html-converters/resources/markdown.pl b/filters/html-converters/resources/markdown.pl index d40b2d0..4c39808 100755 --- a/filters/html-converters/resources/markdown.pl +++ b/filters/html-converters/resources/markdown.pl
@@ -36,7 +36,7 @@ my $g_nested_brackets;
36$g_nested_brackets = qr{ 36$g_nested_brackets = qr{
37 (?> # Atomic matching 37 (?> # Atomic matching
38 [^\[\]]+ # Anything other than brackets 38 [^\[\]]+ # Anything other than brackets
39 | 39 |
40 \[ 40 \[
41 (??{ $g_nested_brackets }) # Recursive set of nested brackets 41 (??{ $g_nested_brackets }) # Recursive set of nested brackets
42 \] 42 \]
@@ -125,7 +125,7 @@ unless ($@) {
125 my $ctx = shift; 125 my $ctx = shift;
126 my $raw = 0; 126 my $raw = 0;
127 if (defined $ctx) { 127 if (defined $ctx) {
128 my $output = $ctx->stash('markdown_output'); 128 my $output = $ctx->stash('markdown_output');
129 if (defined $output && $output =~ m/^html/i) { 129 if (defined $output && $output =~ m/^html/i) {
130 $g_empty_element_suffix = ">"; 130 $g_empty_element_suffix = ">";
131 $ctx->stash('markdown_output', ''); 131 $ctx->stash('markdown_output', '');
@@ -160,7 +160,7 @@ unless ($@) {
160 my $text = shift; 160 my $text = shift;
161 my $ctx = shift; 161 my $ctx = shift;
162 if (defined $ctx) { 162 if (defined $ctx) {
163 my $output = $ctx->stash('markdown_output'); 163 my $output = $ctx->stash('markdown_output');
164 if (defined $output && $output eq 'html') { 164 if (defined $output && $output eq 'html') {
165 $g_empty_element_suffix = ">"; 165 $g_empty_element_suffix = ">";
166 } 166 }
@@ -647,7 +647,7 @@ sub _HashHTMLBlocks {
647 "\n\n" . $key . "\n\n"; 647 "\n\n" . $key . "\n\n";
648 }egmx; 648 }egmx;
649 # Special case just for <hr />. It was easier to make a special case than 649 # Special case just for <hr />. It was easier to make a special case than
650 # to make the other regex more complicated. 650 # to make the other regex more complicated.
651 $text =~ s{ 651 $text =~ s{
652 (?: 652 (?:
653 (?<=\n\n) # Starting after a blank line 653 (?<=\n\n) # Starting after a blank line
@@ -658,7 +658,7 @@ sub _HashHTMLBlocks {
658 [ ]{0,$less_than_tab} 658 [ ]{0,$less_than_tab}
659 <(hr) # start tag = $2 659 <(hr) # start tag = $2
660 \b # word break 660 \b # word break
661 ([^<>])*? # 661 ([^<>])*? #
662 /?> # the matching end tag 662 /?> # the matching end tag
663 [ \t]* 663 [ \t]*
664 (?=\n{2,}|\Z) # followed by a blank line or end of document 664 (?=\n{2,}|\Z) # followed by a blank line or end of document
@@ -998,7 +998,7 @@ sub _DoHeaders {
998 # Setext-style headers: 998 # Setext-style headers:
999 # Header 1 999 # Header 1
1000 # ======== 1000 # ========
1001 # 1001 #
1002 # Header 2 1002 # Header 2
1003 # -------- 1003 # --------
1004 # 1004 #
@@ -1193,7 +1193,7 @@ sub _ProcessListItems {
1193sub _DoCodeBlocks { 1193sub _DoCodeBlocks {
1194# 1194#
1195# Process Markdown `<pre><code>` blocks. 1195# Process Markdown `<pre><code>` blocks.
1196# 1196#
1197 1197
1198 my $text = shift; 1198 my $text = shift;
1199 1199
@@ -1227,26 +1227,26 @@ sub _DoCodeBlocks {
1227sub _DoCodeSpans { 1227sub _DoCodeSpans {
1228# 1228#
1229# * Backtick quotes are used for <code></code> spans. 1229# * Backtick quotes are used for <code></code> spans.
1230# 1230#
1231# * You can use multiple backticks as the delimiters if you want to 1231# * You can use multiple backticks as the delimiters if you want to
1232# include literal backticks in the code span. So, this input: 1232# include literal backticks in the code span. So, this input:
1233# 1233#
1234# Just type ``foo `bar` baz`` at the prompt. 1234# Just type ``foo `bar` baz`` at the prompt.
1235# 1235#
1236# Will translate to: 1236# Will translate to:
1237# 1237#
1238# <p>Just type <code>foo `bar` baz</code> at the prompt.</p> 1238# <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
1239# 1239#
1240# There's no arbitrary limit to the number of backticks you 1240# There's no arbitrary limit to the number of backticks you
1241# can use as delimters. If you need three consecutive backticks 1241# can use as delimters. If you need three consecutive backticks
1242# in your code, use four for delimiters, etc. 1242# in your code, use four for delimiters, etc.
1243# 1243#
1244# * You can use spaces to get literal backticks at the edges: 1244# * You can use spaces to get literal backticks at the edges:
1245# 1245#
1246# ... type `` `bar` `` ... 1246# ... type `` `bar` `` ...
1247# 1247#
1248# Turns to: 1248# Turns to:
1249# 1249#
1250# ... type <code>`bar`</code> ... 1250# ... type <code>`bar`</code> ...
1251# 1251#
1252 1252
@@ -1287,7 +1287,7 @@ sub _EncodeCode {
1287 { 1287 {
1288 no warnings 'once'; 1288 no warnings 'once';
1289 if (defined($blosxom::version)) { 1289 if (defined($blosxom::version)) {
1290 s/\$/&#036;/g; 1290 s/\$/&#036;/g;
1291 } 1291 }
1292 } 1292 }
1293 1293
@@ -1693,8 +1693,8 @@ See the readme file for detailed release notes for this version.
1693 1693
1694=head1 COPYRIGHT AND LICENSE 1694=head1 COPYRIGHT AND LICENSE
1695 1695
1696Copyright (c) 2003-2004 John Gruber 1696Copyright (c) 2003-2004 John Gruber
1697<http://daringfireball.net/> 1697<http://daringfireball.net/>
1698All rights reserved. 1698All rights reserved.
1699 1699
1700Redistribution and use in source and binary forms, with or without 1700Redistribution and use in source and binary forms, with or without