Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13897: Added support for 'class' keyword in addition to 'package'.
Both are equivalent but whereas Foswiki.pm is a package, Foswiki::Object
is class. Hopefully it adds more readility to the documentation.
  • Loading branch information
vrurg committed Sep 22, 2016
1 parent bf1f07a commit 24826b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/lib/Foswiki/IncludeHandlers/doc.pm
Expand Up @@ -84,13 +84,13 @@ sub INCLUDE {
$inPod = 0;
}
elsif ($inPod) {
if ( $line =~ m/^---\+(!!)?\s+package\s+\S+\s*$/ ) {
if ( $line =~ m/^---\+(!!)?\s+(?i:package|class)\s+\S+\s*$/ ) {
if ($isa) {
$line .= $isa;
$isa = undef;
}
$line =~
s/^---\+(?:!!)?\s+package\s*(.*)/---+ =$visibility package= $1/;
s/^---\+(?:!!)?\s+(?i:package|class)\s*(.*)/---+ =$visibility package= $1/;
}
else {
# Check for module names not prefixed with colon or left square
Expand Down Expand Up @@ -236,7 +236,7 @@ sub _getPackSummary ($) {
chomp($line);
push @summary, $line;
}
if ( $line =~ m/^---\+(!!)?\s+package\s+\S+\s*$/ ) {
if ( $line =~ m/^---\+(!!)?\s+(?i:package|class)\s+\S+\s*$/ ) {
$inPackage = 1;
}
}
Expand Down Expand Up @@ -264,7 +264,7 @@ sub _getPackSummary ($) {
sub _loadPublishedAPI {
my $app = shift;
my ( $meta, $text ) =
$app->readTopic( $Foswiki::cfg{SystemWebName}, PUBLISHED_API_TOPIC );
$app->readTopic( $app->cfg->data->{SystemWebName}, PUBLISHED_API_TOPIC );
my @ret;
for my $line ( split /\r?\n/, $text ) {

Expand Down

0 comments on commit 24826b5

Please sign in to comment.