Skip to content

Commit

Permalink
Item14152: Merge commit 'a517114a8d0f0cb5338f37268dd86ca9e36e5253'
Browse files Browse the repository at this point in the history
* commit 'a517114a8d0f0cb5338f37268dd86ca9e36e5253':
  Item13897: doc title is now correctly formed if 'Class' keyword is used instead of 'package'
  • Loading branch information
vrurg committed Sep 27, 2016
2 parents 706e34c + a517114 commit 6eefe98
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 @@ -294,6 +297,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 6eefe98

Please sign in to comment.