Homec4science

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

Authored by epriestley <git@epriestley.com> on Oct 8 2015, 23:18.

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

Committed
epriestley <git@epriestley.com>Oct 8 2015, 23:18
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU8870e8fe9df8: Allow Filesystem::walkToRoot() to operate on fictional paths
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUdbf792a053fc: Prevent exponential explosion of text-mode rendering of deeply nested… (authored by epriestley <git@epriestley.com>).Oct 8 2015, 23:18