- $formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
- return " <span class=\"comment\">$formatted</span>";
+ if ( $useParentheses ) {
+ $formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
+ $classNames = 'comment';
+ } else {
+ $classNames = 'comment comment--without-parentheses';
+ }
+ return " <span class=\"$classNames\">$formatted</span>";