Skip to content

Commit

Permalink
Item13897: doc title is now correctly formed if 'Class' keyword is us…
Browse files Browse the repository at this point in the history
…ed instead of 'package'
  • Loading branch information
vrurg committed Sep 23, 2016
1 parent 24826b5 commit a517114
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/lib/Foswiki/IncludeHandlers/doc.pm
Expand Up @@ -90,7 +90,10 @@ sub INCLUDE {
$isa = undef;
}
$line =~
s/^---\+(?:!!)?\s+(?i:package|class)\s*(.*)/---+ =$visibility package= $1/;
s/^---\+(?:!!)?\s+((?i)package|class)\s*(.*)/---+ =$visibility $1= $2/;
$app->prefs->setSessionPreferences( 'DOC_TITLE',
"---++ !! =$visibility $1= "
. _renderTitle( $app, $class ) );
}
else {
# Check for module names not prefixed with colon or left square
Expand Down Expand Up @@ -291,6 +294,7 @@ sub _renderTitle {
sub _doclink ($) {
my $app = shift;
my $module = $_[0];
$module =~ /^/; # Do it to reset $n match variables.
$module =~ s/^_(.+)(_)$/$1/;
my $formatChar = $2 // '';
my $title = $_[1] || $module;
Expand Down

0 comments on commit a517114

Please sign in to comment.