HomePhabricator

Truncate long source lines in Paste search result list snippets

Description

Truncate long source lines in Paste search result list snippets

Summary:
An attempt to resolve T9600.

  • PhabricatorPasteQuery builds truncated snippet when requested using needSnippet().
  • PhabricatorPasteSearchEngine uses Paste snippet istead of content.
  • PhabricatorSourceCodeView accepts truncated source and type instead of line limit.

Test Plan: Generated some content for Paste application and also added huge JSON oneliner. Checked Paste application pages in browser.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Maniphest Tasks: T9600

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