mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 03:02:47 +01:00
applets/cstd.pl: fix parsing of paragraphs
This commit is contained in:
parent
0edfee6d15
commit
c071bf7604
5
applets/cstd.pl
vendored
5
applets/cstd.pl
vendored
@ -149,7 +149,7 @@ while ($text =~ m/^([0-9A-Z]+\.[0-9.]*)/msgi) {
|
|||||||
|
|
||||||
my $section_text;
|
my $section_text;
|
||||||
|
|
||||||
if ($text =~ /(.*?)^(?=\s{0,4}(?!Footnote)[0-9A-Z]+\.)/msg) {
|
if ($text =~ /(.*?)^(?=(?!Footnote)[0-9A-Z]+\.)/msg) {
|
||||||
$section_text = $1;
|
$section_text = $1;
|
||||||
} else {
|
} else {
|
||||||
print "No section text, end of file marker found.\n" if $debug >= 4;
|
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) {
|
if ($section =~ /Footnote/i) {
|
||||||
$section_text =~ s/^\s{4}//ms;
|
$section_text =~ s/^Footnote.*//msi;
|
||||||
$section_text =~ s/^\s{4}Footnote.*//msi;
|
|
||||||
$section_text =~ s/^\d.*//ms;
|
$section_text =~ s/^\d.*//ms;
|
||||||
$section_text = $this_section . $section_text;
|
$section_text = $this_section . $section_text;
|
||||||
} elsif ($section_text =~ m/(.*?)$/msg) {
|
} elsif ($section_text =~ m/(.*?)$/msg) {
|
||||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4575,
|
BUILD_REVISION => 4576,
|
||||||
BUILD_DATE => "2022-08-26",
|
BUILD_DATE => "2022-08-26",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user