From: Jarkko Hietaniemi Date: Mon, 14 May 2001 18:09:07 +0000 (+0000) Subject: Retract #10094. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b11ded5d5754069e6d7d7be0788bf392bea65ef8;p=p5sagit%2Fp5-mst-13.2.git Retract #10094. p4raw-id: //depot/perl@10104 --- diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index da21ef5..a0dab2d 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -472,18 +472,7 @@ sub seq_b { return $_[0]{alt} ? "``$_[1]''" : $_[1] } sub seq_f { return $_[0]{alt} ? "\"$_[1]\"" : $_[1] } sub seq_i { return '*' . $_[1] . '*' } sub seq_c { - return $_[0]{alt} - ? "``$_[1]''" - : $_[0]{LQUOTE} eq '"' && - $_[1] =~ /^\s*(?: # Some heuristics to avoid some overquoting - (['`"]).*\1 # already quoted - |\$+[\^#]?\S(\[.*\]|\{.*\})? # control or punct var? - |[\$#\@%&*]+[:'\w]+(\[.*\]|\{.*\})? # a "plain" var or func? - |[\$#\@%&*]*[:'\w]+(->)?\(\s*[^\s,]\s*\) # a call, 0 or 1 args? - |[:'\w]+ # a word - )\s*\z/x - ? $_[1] - : "$_[0]{LQUOTE}$_[1]$_[0]{RQUOTE}" + return $_[0]{alt} ? "``$_[1]''" : "$_[0]{LQUOTE}$_[1]$_[0]{RQUOTE}" } # The complicated one. Handle links. Since this is plain text, we can't