Skip to content

Commit 0c24b90

Browse files
author
Michiel Missotten
authored
Right trimming configuration data before markers
A newline is inserted after the data and before the end-section marker. Inserting empty lines in configuration files. Fixes #119
1 parent d4681b5 commit 0c24b90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Configurator/AbstractConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ protected function isFileMarked(Recipe $recipe, $file)
5454

5555
protected function markData(Recipe $recipe, $data)
5656
{
57-
return PHP_EOL.sprintf('###> %s ###%s%s%s###< %s ###%s', $recipe->getName(), PHP_EOL, $data, PHP_EOL, $recipe->getName(), PHP_EOL);
57+
return PHP_EOL.sprintf('###> %s ###%s%s%s###< %s ###%s', $recipe->getName(), PHP_EOL, rtrim($data, PHP_EOL), PHP_EOL, $recipe->getName(), PHP_EOL);
5858
}
5959
}

0 commit comments

Comments
 (0)