diff --git a/.tools/readmes/render.py b/.tools/readmes/render.py index f4e97cd335e..bcd03a88591 100644 --- a/.tools/readmes/render.py +++ b/.tools/readmes/render.py @@ -304,6 +304,7 @@ def render(self) -> RenderStatus: customs=customs, unsupported=unsupported, ) + self.readme_text += "\n" # Jinja is the worst and strips trailing new lines [text, errors] = expand_all_entities(self.readme_text, self.scanner.doc_gen.entities) if errors: raise errors diff --git a/.tools/readmes/runner.py b/.tools/readmes/runner.py index b5691a9c316..18a5315b7c9 100755 --- a/.tools/readmes/runner.py +++ b/.tools/readmes/runner.py @@ -173,6 +173,12 @@ def main(): def make_diff(renderer, id): current = renderer.read_current().split("\n") + if current[-1] != "": + # Ensure final "last" line + current += [""] expected = renderer.readme_text.split("\n") + if expected[-1] != "": + # Ensure final "last" line + expected += [""] diff = unified_diff(current, expected, f"{id}/current", f"{id}/expected") return "\n".join(diff)