diff --git a/Markdown.pl b/Markdown.pl index 88c1d74..c676961 100755 --- a/Markdown.pl +++ b/Markdown.pl @@ -851,6 +851,7 @@ sub _DoAnchors { $title =~ s!([*_~])!$g_escape_table{$1}!g; $result .= " title=\"$title\""; } + $link_text = '[' . $link_text . ']' if $link_text =~ /^\d{1,3}$/; $result .= ">$link_text"; } else { @@ -897,6 +898,7 @@ sub _DoAnchors { $result .= " title=\"$title\""; } + $link_text = '[' . $link_text . ']' if $link_text =~ /^\d{1,3}$/; $result .= ">$link_text"; $result; @@ -929,6 +931,7 @@ sub _DoAnchors { $title =~ s!([*_~])!$g_escape_table{$1}!g; $result .= " title=\"$title\""; } + $link_text = '[' . $link_text . ']' if $link_text =~ /^\d{1,3}$/; $result .= ">$link_text"; } else {