$title->getDBkey(), $section );
}
if ( $sectionTitle ) {
- $link = Linker::makeCommentLink( $sectionTitle, $wgLang->getArrow(), $wikiId, 'noclasses' );
+ $link = Linker::makeCommentLink(
+ $sectionTitle, $wgLang->getArrow() . $auto, $wikiId, 'noclasses'
+ );
+ $auto = '';
} else {
$link = '';
}
# autocomment $postsep written summary (/* section */ summary)
$auto .= wfMessage( 'colon-separator' )->inContentLanguage()->escaped();
}
- $auto = '<span class="autocomment">' . $auto . '</span>';
- $comment = $pre . $link . $wgLang->getDirMark()
- . '<span dir="auto">' . $auto;
- $append .= '</span>';
+ if ( $auto ) {
+ $auto = '<span dir="auto"><span class="autocomment">' . $auto . '</span>';
+ $append .= '</span>';
+ }
+ $comment = $pre . $link . $wgLang->getDirMark() . $auto;
}
return $comment;
},
$formatted = self::formatComment( $comment, $title, $local, $wikiId );
if ( $useParentheses ) {
$formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
+ $classNames = 'comment';
+ } else {
+ $classNames = 'comment comment--without-parentheses';
}
- return " <span class=\"comment\">$formatted</span>";
+ return " <span class=\"$classNames\">$formatted</span>";
}
}