A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

125 lines
5.4 KiB

  1. Changelog
  2. =========
  3. v0.4
  4. ----
  5. Unreleased
  6. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3.2...develop>`__):
  7. - :py:meth:`.Template.has` is now passed *ignore_empty=False* by default
  8. instead of *True*. This fixes a bug when adding parameters to templates with
  9. empty fields, **and is a breaking change if you rely on the default
  10. behavior.**
  11. - The *matches* argument of :py:class:`Wikicode's <.Wikicode>`
  12. :py:meth:`.filter` methods now accepts a function (taking one argument, a
  13. :py:class:`.Node`, and returning a bool) in addition to a regex.
  14. - :py:meth:`.Wikicode.get_sections` now returns sections in the correct order.
  15. - :py:meth:`.Wikicode.matches` now accepts a tuple or list of
  16. strings/:py:class:`.Wikicode` objects instead of just a single string or
  17. :py:class:`.Wikicode`.
  18. - C code cleanup and speed improvements.
  19. v0.3.2
  20. ------
  21. `Released September 1, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3.2>`_
  22. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3.1...v0.3.2>`__):
  23. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  24. - Renamed :py:meth:`.Template.remove`\ 's first argument from *name* to
  25. *param*, which now accepts :py:class:`.Parameter` objects in addition to
  26. parameter name strings.
  27. v0.3.1
  28. ------
  29. `Released August 29, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3.1>`_
  30. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.3...v0.3.1>`__):
  31. - Fixed a parser bug involving URLs nested inside other markup.
  32. - Fixed some typos.
  33. v0.3
  34. ----
  35. `Released August 24, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.3>`_
  36. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.2...v0.3>`__):
  37. - Added complete support for HTML :py:class:`Tags <.Tag>`, including forms like
  38. ``<ref>foo</ref>``, ``<ref name="bar"/>``, and wiki-markup tags like bold
  39. (``'''``), italics (``''``), and lists (``*``, ``#``, ``;`` and ``:``).
  40. - Added support for :py:class:`.ExternalLink`\ s (``http://example.com/`` and
  41. ``[http://example.com/ Example]``).
  42. - :py:class:`Wikicode's <.Wikicode>` :py:meth:`.filter` methods are now passed
  43. *recursive=True* by default instead of *False*. **This is a breaking change
  44. if you rely on any filter() methods being non-recursive by default.**
  45. - Added a :py:meth:`.matches` method to :py:class:`~.Wikicode` for
  46. page/template name comparisons.
  47. - The *obj* param of :py:meth:`Wikicode.insert_before() <.insert_before>`,
  48. :py:meth:`~.insert_after`, :py:meth:`~.Wikicode.replace`, and
  49. :py:meth:`~.Wikicode.remove` now accepts :py:class:`~.Wikicode` objects and
  50. strings representing parts of wikitext, instead of just nodes. These methods
  51. also make all possible substitutions instead of just one.
  52. - Renamed :py:meth:`Template.has_param() <.has_param>` to
  53. :py:meth:`~.Template.has` for consistency with :py:class:`~.Template`\ 's
  54. other methods; :py:meth:`~.has_param` is now an alias.
  55. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  56. - Various bugfixes, internal changes, and cleanup.
  57. v0.2
  58. ----
  59. `Released June 20, 2013 <https://github.com/earwig/mwparserfromhell/tree/v0.2>`_
  60. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.1.1...v0.2>`__):
  61. - The parser now fully supports Python 3 in addition to Python 2.7.
  62. - Added a C tokenizer extension that is significantly faster than its Python
  63. equivalent. It is enabled by default (if available) and can be toggled by
  64. setting :py:attr:`mwparserfromhell.parser.use_c` to a boolean value.
  65. - Added a complete set of unit tests covering parsing and wikicode
  66. manipulation.
  67. - Renamed :py:meth:`.filter_links` to :py:meth:`.filter_wikilinks` (applies to
  68. :py:meth:`.ifilter` as well).
  69. - Added filter methods for :py:class:`Arguments <.Argument>`,
  70. :py:class:`Comments <.Comment>`, :py:class:`Headings <.Heading>`, and
  71. :py:class:`HTMLEntities <.HTMLEntity>`.
  72. - Added *before* param to :py:meth:`Template.add() <.Template.add>`; renamed
  73. *force_nonconformity* to *preserve_spacing*.
  74. - Added *include_lead* param to :py:meth:`Wikicode.get_sections()
  75. <.get_sections>`.
  76. - Removed *flat* param from :py:meth:`.get_sections`.
  77. - Removed *force_no_field* param from :py:meth:`Template.remove()
  78. <.Template.remove>`.
  79. - Added support for Travis CI.
  80. - Added note about Windows build issue in the README.
  81. - The tokenizer will limit itself to a realistic recursion depth to prevent
  82. errors and unreasonably long parse times.
  83. - Fixed how some nodes' attribute setters handle input.
  84. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  85. - Fixed bugs in the implementation of :py:class:`.SmartList` and
  86. :py:class:`.StringMixIn`.
  87. - Fixed some broken example code in the README; other copyedits.
  88. - Other bugfixes and code cleanup.
  89. v0.1.1
  90. ------
  91. `Released September 21, 2012 <https://github.com/earwig/mwparserfromhell/tree/v0.1.1>`_
  92. (`changes <https://github.com/earwig/mwparserfromhell/compare/v0.1...v0.1.1>`__):
  93. - Added support for :py:class:`Comments <.Comment>` (``<!-- foo -->``) and
  94. :py:class:`Wikilinks <.Wikilink>` (``[[foo]]``).
  95. - Added corresponding :py:meth:`.ifilter_links` and :py:meth:`.filter_links`
  96. methods to :py:class:`.Wikicode`.
  97. - Fixed a bug when parsing incomplete templates.
  98. - Fixed :py:meth:`.strip_code` to affect the contents of headings.
  99. - Various copyedits in documentation and comments.
  100. v0.1
  101. ----
  102. `Released August 23, 2012 <https://github.com/earwig/mwparserfromhell/tree/v0.1>`_:
  103. - Initial release.