1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

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
This commit is contained in:
epriestley 2015-05-11 11:10:42 -07:00
parent 51facbabba
commit 75fc4e763a

View file

@ -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) {