A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

132 Zeilen
5.8 KiB

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