Page MenuHomePhabricator

Make the Arcanist comment remover less aggressive about stripping instructional comments

Authored by epriestley on Sep 5 2018, 3:54 PM.



Ref T13098. See PHI858. If you write this at the end of a message in arc diff:


# Describe the changes in this new revision.
# ...

...we'll currently eat the #projectname as an instructional comment, even if it is followed by an empty line.

Instead, stop eating stuff once we hit the first empty line. (We escape empty lines in comments already.)

After T13098 I'll maybe adjust this to use a more explicit instruction escape, like ##, since there's no reason we're bound to #.

Test Plan

Added a unit test and made it pass.

Diff Detail

rARC Arcanist
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Sep 5 2018, 3:54 PM
epriestley requested review of this revision.Sep 5 2018, 3:54 PM
amckinley accepted this revision.Sep 5 2018, 10:40 PM
This revision is now accepted and ready to land.Sep 5 2018, 10:40 PM
This revision was automatically updated to reflect the committed changes.
avivey added a subscriber: avivey.Oct 15 2018, 10:58 PM reports an issue with this new behavior - probably if the Subscribers is left empty, the parser takes the first line of the comment.