From c5e1903ded9ee36e1fc95ed4e752a1bd95d13707 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 13 Apr 2010 22:07:45 +0000 Subject: [PATCH] Added missing section and section title for paragraph specification --- modules/cstd.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/cstd.pl b/modules/cstd.pl index d34b28b7..dbd4996f 100755 --- a/modules/cstd.pl +++ b/modules/cstd.pl @@ -79,7 +79,7 @@ if($list_only) { $result = "Sections containing '$search': "; } -$search =~ s/\s+/.*/g; +$search =~ s/\s+/.*?/g; while($text =~ m/^\s{4}(\d+\.[0-9\.]*)/msg) { $this_section = $1; @@ -117,6 +117,8 @@ while($text =~ m/^\s{4}(\d+\.[0-9\.]*)/msg) { if($paragraph_specified == $USER_SPECIFIED and not length $search and $p == $paragraph) { $result = $t if not $found; + $found_section = $this_section; + $found_section_title = $section_title; $found = 1; last; } @@ -169,7 +171,7 @@ while($text =~ m/^\s{4}(\d+\.[0-9\.]*)/msg) { } if(not $found and $comma eq "") { - $search =~ s/\.\*/ /g; + $search =~ s/\.\*\?/ /g; if($section_specified) { print "No such text '$search' found within section '$section' in n1256.\n" if length $search; print "No such section '$section' in n1256.\n" if not length $search;