Merge pull request #619 from mDuo13/workaround_build_error

External links: work around type inconsistency of link class
This commit is contained in:
Rome Reginelli
2019-07-09 13:15:21 -07:00
committed by GitHub

View File

@@ -28,4 +28,7 @@ def filter_soup(soup, **kwargs):
"aria-hidden": "true"})
link.append(" ")
link.append(ex_link_marker)
link['class'] = link.get('class',[]) + ['external-link']
oldclass = link.get('class',[])
if type(oldclass) == str:
oldclass = [oldclass]
link['class'] = oldclass + ['external-link']