Commit 302cd5f8c00ddd314f632f7d005ef17868ba45b5

Martin Mitas 2017-07-13T18:54:34

Improve lookup of link reference definitions. At the cost of remembering all reference definitions (even when having same label), we improved the lookup from O(n) to O(log(n)). This also fixes potential DOS attack by providing input with thousandslink reference definitions and references to them.