Skip to content

Commit 0427594

Browse files
committed
Use JSON_UNESCAPED_SLASHES for lint commands output
1 parent 3b5c353 commit 0427594

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
202202
}
203203
});
204204

205-
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0));
205+
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT JSON_UNESCAPED_SLASHES : 0));
206206

207207
return min($errors, 1);
208208
}

src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function displayJson(OutputInterface $output, $filesInfo)
156156
}
157157
});
158158

159-
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0));
159+
$output->writeln(json_encode($filesInfo, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES : 0));
160160

161161
return min($errors, 1);
162162
}

0 commit comments

Comments
 (0)