Homec4science

Improve hardwrapping for input with newlines

Authored by epriestley <git@epriestley.com> on Mar 23 2013, 08:04.

Description

Improve hardwrapping for input with newlines

Summary:
If input text has newlines, phutil_utf8_hard_wrap currently does not reset the wrap counter upon encountering a newline. This is consistent with phutil_utf8_hard_wrap_html, but inconvenient.

Instead, process it in a line-oriented way to improve this behavior. Fixes weird diffs in Phriction.

Test Plan: Diffs in Phriction look less weird now.

Reviewers: chad, kwadwon

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5423

Details

Committed
epriestley <git@epriestley.com>Mar 23 2013, 08:04
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU18584807ecb4: (Key,Value) cache can now use namespace
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUd373cae08ac0: Improve hardwrapping for input with newlines (authored by epriestley <git@epriestley.com>).Mar 23 2013, 08:04