Home GnuPG

Prevent exponential explosion of text-mode rendering of deeply nested…
dbf792a053fcUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

Prevent exponential explosion of text-mode rendering of deeply nested blockquotes

Summary:
Currently, the text-mode rendering of blockquotes doubles the number of lines in the input text. For example, a deeply nested input text like this:

>>>> a
>>>> b

...gets expanded to:

> a

> b

...then to:

> > a

>

> > b

>

...and so on. If you nest something 28 levels deep, we generate 60 million lines from it.

So:

  • Stop doing that.
  • Make it look nicer.
  • Also make it put ">>>" at the beginning instead of "> > >".

Special thanks to @csilvers for hunting this down.

Test Plan:
Added a unit test.

Generated mail for >>>>>>>>>>>>>>>>>>>>>>>>>>> REQUESTING CHANGES BECAUSE I'M ANGRY!.

Reviewers: chad

Reviewed By: chad

Subscribers: spicyj, csilvers

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

Details

Provenance
epriestley <git@epriestley.com>Authored on Oct 8 2015, 11:18 PM
Parents
rPHUTIL8870e8fe9df8: Allow Filesystem::walkToRoot() to operate on fictional paths
Branches
Unknown
Tags
Unknown

Event Timeline