From c071bf760415a11660c06433270777ca183b0f05 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 26 Aug 2022 11:18:20 -0700 Subject: [PATCH] applets/cstd.pl: fix parsing of paragraphs --- applets/cstd.pl | 5 ++--- lib/PBot/VERSION.pm | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/applets/cstd.pl b/applets/cstd.pl index 3d79db4a..e885d389 100755 --- a/applets/cstd.pl +++ b/applets/cstd.pl @@ -149,7 +149,7 @@ while ($text =~ m/^([0-9A-Z]+\.[0-9.]*)/msgi) { my $section_text; - if ($text =~ /(.*?)^(?=\s{0,4}(?!Footnote)[0-9A-Z]+\.)/msg) { + if ($text =~ /(.*?)^(?=(?!Footnote)[0-9A-Z]+\.)/msg) { $section_text = $1; } else { print "No section text, end of file marker found.\n" if $debug >= 4; @@ -157,8 +157,7 @@ while ($text =~ m/^([0-9A-Z]+\.[0-9.]*)/msgi) { } if ($section =~ /Footnote/i) { - $section_text =~ s/^\s{4}//ms; - $section_text =~ s/^\s{4}Footnote.*//msi; + $section_text =~ s/^Footnote.*//msi; $section_text =~ s/^\d.*//ms; $section_text = $this_section . $section_text; } elsif ($section_text =~ m/(.*?)$/msg) { diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index aef3a508..ac0f7ba8 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4575, + BUILD_REVISION => 4576, BUILD_DATE => "2022-08-26", };