Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem arose as follows. The input was ``` *****Hello*world**** ``` We have an `openers_bottom` table that limits how far back you have to look for an opener. It is indexed to the type of delimiter (`_` or `*`) and the length of the closing delimiter mod 3. So after we fail to match the opener `*****` to `*`, we set the openers_bottom for `(*, 1)` to the location of `*`, effectively removing the `*****` as a possible opener for any run of `*`s with a length mod 3 of 1, including the final `****` in this example. This procedure ignores the fact that the length mod 3 restriction only matters if one of the delimiters can be both an opener and a closer. To fix this problem, we index the `openers_bottom` table not just to the type of delimiter and the length of the closing delimiter mod 3, but to whether the closing delimiter can also be an opener.
- Loading branch information