Closed jctiru closed 6 years ago
Line 194 you have an extra </div>
. Remember that just because your HTML loads in a browser, it doesn't mean that it is proper, valid HTML. HTML browsers are, in my opinion, too forgiving, which leads to people writing bad HTML. In the future, at least when dealing with HTML, please run it through an HTML validator first: https://validator.w3.org/#validate_by_input. 90% of the time when BH fails in HTML, it is because of bad HTML, not a problem with the algorithm for matching.
Also, BH can help you figure out issues like this if you take the time to walk down the file and see where the matching goes wrong. You can very quickly identify where things go wrong by simply testing out blocks down the document. You'll see sub-blocks match fine, and then you'll find some that don't. And as you descend into the ones which don't, you'll find the smallest possible failing blocks and usually see why your matching failed.
As this is a user error, I'll close this issue.
Thank you for the fast reply and tips. It is clearly my bad and sorry for the trouble. Thanks again for the whole awesome project.
Description
(Currently using 20,000 as threshold for testing purposes)
![image](https://user-images.githubusercontent.com/34016067/34212064-1038fc06-e5d6-11e7-918f-52f89990cae2.png)
Support Info
Steps to Reproduce Issue
HTML Code
<html>
and there will be no matching bracket.</html>
and there is successful match.