spoiler-auto-cw #1
2 changed files with 4 additions and 4 deletions
|
@ -2184,9 +2184,9 @@ class BBCode
|
|||
* Returns a list of the headings of "spoiler" elements
|
||||
*
|
||||
* @param string $text The text containing spoiler elements
|
||||
* @return array The list of spoiler headings
|
||||
* @return string The list of spoiler headings
|
||||
*/
|
||||
public static function getSpoilerHeadings(string $text): array
|
||||
public static function getSpoilerHeadings(string $text): string
|
||||
{
|
||||
DI::profiler()->startRecording('rendering');
|
||||
|
||||
|
@ -2197,7 +2197,7 @@ class BBCode
|
|||
$headings[] = BBCode::toPlaintext($item);
|
||||
}
|
||||
}
|
||||
return $headings;
|
||||
return implode(', ', $headings);
|
||||
});
|
||||
|
||||
DI::profiler()->stopRecording();
|
||||
|
|
|
@ -1605,7 +1605,7 @@ class Transmitter
|
|||
} else {
|
||||
$warnings = BBCode::getSpoilerHeadings($item['body']);
|
||||
if ($warnings) {
|
||||
$data['summary'] = implode(', ', $warnings);
|
||||
$data['summary'] = $warnings;
|
||||
$data['keithext:summaryFromSpoilers'] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue