applying changes from https://github.com/ecenter/markdownify