You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split Review Body Lines Where GitHub Does in pr_review.py #3259
scripts/pr_review.py reads a review body line by line through str.splitlines() at most of its line readers, coverage_statements, the headline reader, and unrecognized_in among them. splitlines breaks on a vertical tab, a form feed, \x1c through \x1e, \x85, , and as well as on \n and \r. GitHub ends a line only at \n, \r\n, or \r, so a body carrying any of the others is split where GitHub renders one line.
Constructed case:
Prose about the change.\v## Overview
GitHub renders this as one paragraph. unrecognized_in splits it and reads ## Overview as a heading. The same split turns #\vOverview, which GitHub renders as text, into a bare # line that the heading reader now reads as an empty heading.
QUOTED_CHAR already spells out the splitlines set so that mask_quotations stays line-aligned with it, which shows the split is known there. What is missing is the readers splitting where GitHub does.
Expected
The line readers split on GitHub's own line endings, with the constructed case pinned by a test, and QUOTED_CHAR's alignment reasoning reconciled with the new split. No reviewer body has been seen carrying one of these characters, so this ranks low.
Found while consolidating the block-shape primitives for #3241.
Activity
Compose pr_review.py's Block Shapes From One Primitive Each (#3261)
Pin pr_review.py's Markdown Reader Gaps as Known Limits (#3270)