A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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