A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

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