A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

141 rinda
6.8 KiB

  1. v0.4.1 (unreleased):
  2. - The process for building Windows binaries has been fixed, and these should be
  3. distributed along with new releases. Windows users can now take advantage of
  4. C speedups without having a compiler of their own.
  5. - Added support for Python 3.5.
  6. - '<' and '>' are now disallowed in wikilink titles and template names. This
  7. includes when denoting tags, but not comments.
  8. - Fixed the behavior of preserve_spacing in Template.add() and keep_field in
  9. Template.remove() on parameters with hidden keys.
  10. - Fixed parser bugs involving:
  11. - templates with completely blank names;
  12. - templates with newlines and comments.
  13. - Heavy refactoring and fixes to the C tokenizer.
  14. - Fixed some bugs in the release scripts.
  15. v0.4 (released May 23, 2015):
  16. - The parser now falls back on pure Python mode if C extensions cannot be
  17. built. This fixes an issue that prevented some Windows users from installing
  18. the parser.
  19. - Added support for parsing wikicode tables (patches by David Winegar).
  20. - Added a script to test for memory leaks in scripts/memtest.py.
  21. - Added a script to do releases in scripts/release.sh.
  22. - skip_style_tags can now be passed to mwparserfromhell.parse() (previously,
  23. only Parser().parse() allowed it).
  24. - The 'recursive' argument to Wikicode's filter methods now accepts a third
  25. option, RECURSE_OTHERS, which recurses over all children except instances of
  26. 'forcetype' (for example, `code.filter_templates(code.RECURSE_OTHERS)`
  27. returns all un-nested templates).
  28. - The parser now understands HTML tag attributes quoted with single quotes.
  29. When setting a tag attribute's value, quotes will be added if necessary. As
  30. part of this, Attribute's 'quoted' attribute has been changed to 'quotes',
  31. and is now either a string or None.
  32. - Calling Template.remove() with a Parameter object that is not part of the
  33. template now raises ValueError instead of doing nothing.
  34. - Parameters with non-integer keys can no longer be created with
  35. 'showkey=False', nor have the value of this attribute be set to False later.
  36. - _ListProxy.destroy() has been changed to _ListProxy.detach(), and now works
  37. in a more useful way.
  38. - If something goes wrong while parsing, ParserError will now be raised.
  39. Previously, the parser would produce an unclear BadRoute exception or allow
  40. an incorrect node tree to be build.
  41. - Fixed parser bugs involving:
  42. - nested tags;
  43. - comments in template names;
  44. - tags inside of <nowiki> tags.
  45. - Added tests to ensure that parsed trees convert back to wikicode without
  46. unintentional modifications.
  47. - Added support for a NOWEB environment variable, which disables a unit test
  48. that makes a web call.
  49. - Test coverage has been improved, and some minor related bugs have been fixed.
  50. - Updated and fixed some documentation.
  51. v0.3.3 (released April 22, 2014):
  52. - Added support for Python 2.6 and 3.4.
  53. - Template.has() is now passed 'ignore_empty=False' by default instead of True.
  54. This fixes a bug when adding parameters to templates with empty fields, and
  55. is a breaking change if you rely on the default behavior.
  56. - The 'matches' argument of Wikicode's filter methods now accepts a function
  57. (taking one argument, a Node, and returning a bool) in addition to a regex.
  58. - Re-added 'flat' argument to Wikicode.get_sections(), fixed the order in which
  59. it returns sections, and made it faster.
  60. - Wikicode.matches() now accepts a tuple or list of strings/Wikicode objects
  61. instead of just a single string or Wikicode.
  62. - Given the frequency of issues with the (admittedly insufficient) tag parser,
  63. there's a temporary skip_style_tags argument to parse() that ignores '' and
  64. ''' until these issues are corrected.
  65. - Fixed a parser bug involving nested wikilinks and external links.
  66. - C code cleanup and speed improvements.
  67. v0.3.2 (released September 1, 2013):
  68. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  69. - Renamed Template.remove()'s first argument from 'name' to 'param', which now
  70. accepts Parameter objects in addition to parameter name strings.
  71. v0.3.1 (released August 29, 2013):
  72. - Fixed a parser bug involving URLs nested inside other markup.
  73. - Fixed some typos.
  74. v0.3 (released August 24, 2013):
  75. - Added complete support for HTML Tags, including forms like <ref>foo</ref>,
  76. <ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and
  77. lists (*, #, ; and :).
  78. - Added support for ExternalLinks (http://example.com/ and
  79. [http://example.com/ Example]).
  80. - Wikicode's filter methods are now passed 'recursive=True' by default instead
  81. of False. This is a breaking change if you rely on any filter() methods being
  82. non-recursive by default.
  83. - Added a matches() method to Wikicode for page/template name comparisons.
  84. - The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and
  85. remove() now accepts other Wikicode objects and strings representing parts of
  86. wikitext, instead of just nodes. These methods also make all possible
  87. substitutions instead of just one.
  88. - Renamed Template.has_param() to has() for consistency with Template's other
  89. methods; has_param() is now an alias.
  90. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  91. - Various bugfixes, internal changes, and cleanup.
  92. v0.2 (released June 20, 2013):
  93. - The parser now fully supports Python 3 in addition to Python 2.7.
  94. - Added a C tokenizer extension that is significantly faster than its Python
  95. equivalent. It is enabled by default (if available) and can be toggled by
  96. setting `mwparserfromhell.parser.use_c` to a boolean value.
  97. - Added a complete set of unit tests covering parsing and wikicode
  98. manipulation.
  99. - Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as
  100. well).
  101. - Added filter methods for Arguments, Comments, Headings, and HTMLEntities.
  102. - Added 'before' param to Template.add(); renamed 'force_nonconformity' to
  103. 'preserve_spacing'.
  104. - Added 'include_lead' param to Wikicode.get_sections().
  105. - Removed 'flat' param from Wikicode.get_sections().
  106. - Removed 'force_no_field' param from Template.remove().
  107. - Added support for Travis CI.
  108. - Added note about Windows build issue in the README.
  109. - The tokenizer will limit itself to a realistic recursion depth to prevent
  110. errors and unreasonably long parse times.
  111. - Fixed how some nodes' attribute setters handle input.
  112. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  113. - Fixed bugs in the implementation of SmartList and StringMixIn.
  114. - Fixed some broken example code in the README; other copyedits.
  115. - Other bugfixes and code cleanup.
  116. v0.1.1 (released September 21, 2012):
  117. - Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]).
  118. - Added corresponding ifilter_links() and filter_links() methods to Wikicode.
  119. - Fixed a bug when parsing incomplete templates.
  120. - Fixed strip_code() to affect the contents of headings.
  121. - Various copyedits in documentation and comments.
  122. v0.1 (released August 23, 2012):
  123. - Initial release.