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.
 
 
 
 

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