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.
 
 
 
 

74 lines
3.3 KiB

  1. v0.4 (unreleased):
  2. - The 'matches' argument of Wikicode's filter methods now accepts a function
  3. (taking one argument, a Node, and returning a bool) in addition to a regex.
  4. v0.3.2 (released September 1, 2013):
  5. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  6. - Renamed Template.remove()'s first argument from 'name' to 'param', which now
  7. accepts Parameter objects in addition to parameter name strings.
  8. v0.3.1 (released August 29, 2013):
  9. - Fixed a parser bug involving URLs nested inside other markup.
  10. - Fixed some typos.
  11. v0.3 (released August 24, 2013):
  12. - Added complete support for HTML Tags, including forms like <ref>foo</ref>,
  13. <ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and
  14. lists (*, #, ; and :).
  15. - Added support for ExternalLinks (http://example.com/ and
  16. [http://example.com/ Example]).
  17. - Wikicode's filter methods are now passed 'recursive=True' by default instead
  18. of False. This is a breaking change if you rely on any filter() methods being
  19. non-recursive by default.
  20. - Added a matches() method to Wikicode for page/template name comparisons.
  21. - The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and
  22. remove() now accepts other Wikicode objects and strings representing parts of
  23. wikitext, instead of just nodes. These methods also make all possible
  24. substitutions instead of just one.
  25. - Renamed Template.has_param() to has() for consistency with Template's other
  26. methods; has_param() is now an alias.
  27. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  28. - Various bugfixes, internal changes, and cleanup.
  29. v0.2 (released June 20, 2013):
  30. - The parser now fully supports Python 3 in addition to Python 2.7.
  31. - Added a C tokenizer extension that is significantly faster than its Python
  32. equivalent. It is enabled by default (if available) and can be toggled by
  33. setting `mwparserfromhell.parser.use_c` to a boolean value.
  34. - Added a complete set of unit tests covering parsing and wikicode
  35. manipulation.
  36. - Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as
  37. well).
  38. - Added filter methods for Arguments, Comments, Headings, and HTMLEntities.
  39. - Added 'before' param to Template.add(); renamed 'force_nonconformity' to
  40. 'preserve_spacing'.
  41. - Added 'include_lead' param to Wikicode.get_sections().
  42. - Removed 'flat' param from Wikicode.get_sections().
  43. - Removed 'force_no_field' param from Template.remove().
  44. - Added support for Travis CI.
  45. - Added note about Windows build issue in the README.
  46. - The tokenizer will limit itself to a realistic recursion depth to prevent
  47. errors and unreasonably long parse times.
  48. - Fixed how some nodes' attribute setters handle input.
  49. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  50. - Fixed bugs in the implementation of SmartList and StringMixIn.
  51. - Fixed some broken example code in the README; other copyedits.
  52. - Other bugfixes and code cleanup.
  53. v0.1.1 (released September 21, 2012):
  54. - Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]).
  55. - Added corresponding ifilter_links() and filter_links() methods to Wikicode.
  56. - Fixed a bug when parsing incomplete templates.
  57. - Fixed strip_code() to affect the contents of headings.
  58. - Various copyedits in documentation and comments.
  59. v0.1 (released August 23, 2012):
  60. - Initial release.