From 75fc4e763ad60e02ae2de4be8112c8f1eeb9bb5a Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 May 2015 11:10:42 -0700 Subject: [PATCH] Don't trim remarkup corpora before summarizing Summary: Currently, lists like this: ``` - a - b - c ``` ...get trimmed before summarization and end up looking like this after summarization: ``` - a - b - c ``` This produces the summary artifacts (first item at wrong indent level): {F399841} Instead, don't trim. This produces better summaries. Test Plan: Saw a better summary of a list. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D12794 --- src/infrastructure/markup/PhabricatorMarkupEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/markup/PhabricatorMarkupEngine.php b/src/infrastructure/markup/PhabricatorMarkupEngine.php index 491940d23f..ccfe1e44fd 100644 --- a/src/infrastructure/markup/PhabricatorMarkupEngine.php +++ b/src/infrastructure/markup/PhabricatorMarkupEngine.php @@ -586,7 +586,7 @@ final class PhabricatorMarkupEngine { // - Hopefully don't return too much text. We don't explicitly limit // this right now. - $blocks = preg_split("/\n *\n\s*/", trim($corpus)); + $blocks = preg_split("/\n *\n\s*/", $corpus); $best = null; foreach ($blocks as $block) {