1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

[ticket/16072] Update s9e/text-formatter

PHPBB3-16072
This commit is contained in:
JoshyPHP
2019-05-31 22:46:59 +02:00
parent c04642f987
commit 76ea1de0ab
3 changed files with 59 additions and 20 deletions

View File

@@ -14,7 +14,7 @@
namespace phpbb\textformatter\s9e;
use phpbb\textformatter\s9e\factory;
use s9e\TextFormatter\Configurator\Helpers\TemplateHelper;
use s9e\TextFormatter\Configurator\Helpers\TemplateLoader;
use s9e\TextFormatter\Configurator\Items\UnsafeTemplate;
class bbcode_merger
@@ -91,9 +91,9 @@ class bbcode_merger
*/
protected function indent_template($template)
{
$dom = TemplateHelper::loadTemplate($template);
$dom = TemplateLoader::load($template);
$dom->formatOutput = true;
$template = TemplateHelper::saveTemplate($dom);
$template = TemplateLoader::save($dom);
// Remove the first level of indentation if the template starts with whitespace
if (preg_match('(^\\n +)', $template, $m))