Add the right square bracket (]) to the list of escaped symbols. This is necessary to correctly represent a link text containing a right square bracket:
html = '<a href="citation.html">[How to cite this work]</a>'
print(markdownify(html))
# before this pr: r'[\[How to cite this work]](citation.html)'
# after this pr: r'[\[How to cite this work\]](citation.html)'
Could you also add a test for this case to the testsuite? (Note, you need a fix to test function naming from #149 or #122 for the miscellaneous escaping tests to actually be run.)
Add the right square bracket (]) to the list of escaped symbols. This is necessary to correctly represent a link text containing a right square bracket: