Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"<references>" tag extracted -- should be ignored. #4

Open
halfak opened this issue Aug 12, 2015 · 0 comments
Open

"<references>" tag extracted -- should be ignored. #4

halfak opened this issue Aug 12, 2015 · 0 comments

Comments

@halfak
Copy link
Member

halfak commented Aug 12, 2015

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from mwrefs import extract
>>> list(extract.extract("""<references>
... <ref name = "COL">{{webbref |url= http://www.catalogueoflife.org/annual-checklist/2011/search/all/key/phrixocomes+gephyrea/match/1|titel= Species 2000 & ITIS Catalogue of Life: 2011 Annual Checklist.|hämtdatum= 24 september 2012 |författare= Bisby F.A., Roskov Y.R., Orrell T.M., Nicolson D., Paglinawan L.E., Bailly N., Kirk P.M., Bourgoin T., Baillargeon G., Ouvrard D. (red.)|datum= 2011|verk= |utgivare=Species 2000: Reading, UK.}}</ref>
... <ref name = "source">''LepIndex: The Global Lepidoptera Names Index''. Beccaloni G.W., Scoble M.J., Robinson G.S. & Pitkin B., 2005-06-15</ref>
... </references>"""))
['<references>\n<ref name = "COL">{{webbref |url= http://www.catalogueoflife.org/annual-checklist/2011/search/all/key/phrixocomes+gephyrea/match/1|titel= Species 2000 & ITIS Catalogue of Life: 2011 Annual Checklist.|h\xc3\xa4mtdatum= 24 september 2012 |f\xc3\xb6rfattare= Bisby F.A., Roskov Y.R., Orrell T.M., Nicolson D., Paglinawan L.E., Bailly N., Kirk P.M., Bourgoin T., Baillargeon G., Ouvrard D. (red.)|datum= 2011|verk= |utgivare=Species 2000: Reading, UK.}}</ref>', '<ref name = "source">\'\'LepIndex: The Global Lepidoptera Names Index\'\'. Beccaloni G.W., Scoble M.J., Robinson G.S. & Pitkin B., 2005-06-15</ref>']

This can probably be fixed by updating the regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant