File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/Symfony/Component/Yaml Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -323,18 +323,16 @@ private function getNextEmbedBlock($indentation = null)
323
323
break ;
324
324
}
325
325
326
- if ($ removeComments && $ this -> isCurrentLineEmpty () || $ this ->isCurrentLineBlank ()) {
327
- if ($ this ->isCurrentLineBlank ()) {
328
- $ data [] = substr ( $ this -> currentLine , $ newIndent ) ;
329
- }
326
+ if ($ this ->isCurrentLineBlank ()) {
327
+ $ data [] = substr ($ this ->currentLine , $ newIndent );
328
+ continue ;
329
+ }
330
330
331
+ if ($ removeComments && $ this ->isCurrentLineComment ()) {
331
332
continue ;
332
333
}
333
334
334
- if (preg_match ('#^(?P<text> *)$# ' , $ this ->currentLine , $ match )) {
335
- // empty line
336
- $ data [] = $ match ['text ' ];
337
- } elseif ($ indent >= $ newIndent ) {
335
+ if ($ indent >= $ newIndent ) {
338
336
$ data [] = substr ($ this ->currentLine , $ newIndent );
339
337
} elseif (0 == $ indent ) {
340
338
$ this ->moveToPreviousLine ();
You can’t perform that action at this time.
0 commit comments