Skip to content

Commit

Permalink
Item14237: Fixed handling of package with {} syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 25, 2017
1 parent 0d2d325 commit 61bf816
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/lib/Foswiki/IncludeHandlers/doc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ sub INCLUDE {
$perl,
{
_Package =>
'(?:(?<=\n)\bpackage|\Apackage)\s+(?<packageName>[\w:]+);',
'(?:(?<=\n)\bpackage|\Apackage)\s+(?<packageName>[\w:]+)\s*(?:;|{)',
_Doc =>
'\n=(?:begin(?:\h+(?:twiki|TML|html))?|pod)\h*\n(?<docText>.+?\n)=cut\h*?(?=\n)',
_Extends => $extendsRx . $paramsRx,
Expand All @@ -111,7 +111,8 @@ sub INCLUDE {
}
elsif ( $lType =~ '^_(Extends|With)$' ) {
Foswiki::Exception::Fatal->throw( text =>
'Found class modifiers before a package declaration.' )
"Found class modifiers before a package declaration for "
. $class )
if !defined($curPackage);
my $miKey = lc($1);
my $params = $ctxCode->{lexemes}{params};
Expand Down

0 comments on commit 61bf816

Please sign in to comment.