atlassian/pegdown — pull request #1 by mheemskerk (2014-10-07 08:40:25+00:00)
Title: Limit the amount of nesting of [] elements and add a parsing timeout

The parsing timeout prevents the parser from going into a tail spin when it encounters pathological cases with lots of unbalanced `[` characters in things like ASCII art.

The downside of the parsing timeout is that the markdown rendering fails with an exception.

The limit on the nesting of labels prevents the parser from going into a tail spin to begin with. It still allows nested labels in markdown such as

```
[Something in brackets like [this][] should work]
```

but prevents the parser from going down the rabbit hole when there are lots and lots of unbalanced `[` characters.