add function to extract templates to library
Likely the most complex element to extract. Appears in mainly two forms:
- as
href
of Wikilinks : also has a similar case, where WIKILINKhref
s haveCategory
links - in which case we don't consider those elements as Categories. So, we have to make a decision regarding what can we do about such Template links.
- nested inside
data-mw
: is complicated to process, due to the asymmetric nature of thedata-mw
dictionary, JSON decoding errors due to the presence of escape characters, malformed strings, and bad use(single/double) of quotation mark etc.
Edited by Appledora