Skip to content

Releases: clokep/mwcomposerfromhell

v0.5

23 Dec 20:30
Compare
Choose a tag to compare
  • Remove the "module" infrastructure and implement parser functions as a replacement. This is not a 1-to-1 replacement, as #invoke is not implemented, but the APIs now exist in a sane way to implement any parser function.
  • Basic support for subst and safesubst.
  • Add a mwcomposerfromhell.parser_tests_parser module to read MediaWiki parser test files.
  • Fix a bug ("Template loop detected") if the same unknown template appeared multiple times when decoding wikicode.
  • Various internal improvements, including type hints and f-strings.
  • Many minor bugs fixed and additional compatibility with MediaWiki.
  • Changed packaging to use setuptools declarative config in setup.cfg.
  • Support Python 3.10 and 3.11, drop support for Python 3.6.

v0.4

23 Dec 20:29
Compare
Choose a tag to compare

Breaking change: The constructor to WikicodeToHtmlComposer has changed to support articles in multiple namespaces. Be sure to adapt your code if you're instantiating a composer directly.

  • Article resolution was modified and is now handled in a separate base class. As part of this, the default base URL was changed to /wiki.
  • Basic support for magic words.
  • Better handling of text surrounding comment tags.
  • Handling of article content outside of the Template namespace is supported.
  • Ensure there isn't an infinite loop in template transclusion.
  • Partially support rendering of edit links.
  • Properly handle nowiki, includeonly, and noinclude tags.
  • Support link trails (e.g. [[Foo]]bar).
  • More accurate table rendering.
  • Support for handling preformatted text (in the body or in a pre tag).
  • The mwcomposerfromhell module can now run as a module to convert a file.
  • Do not render raw a tags.

v0.3

23 Dec 20:28
Compare
Choose a tag to compare
  • Fix escaping HTML entities in text (e.g. convert < to &lt;).
  • Handling of paragraphs and multiple line breaks has been greatly improved.
  • Links now include a title attribute and are properly capitalized.
  • Properly handle self-closing tags (e.g. <hr />).
  • Descriptions lists with details are properly handled.
  • Comments are ignored instead of propagating them to the output.
  • The composer no longer supports a streaming interface.
  • Basic type hints are included.

v0.2.1

23 Dec 20:27
Compare
Choose a tag to compare
  • Stop modifying the mwparserfromhell library.

  • Remove obsolete methods to directly handle a list or tuple in the WikicodeToHtmlComposer

  • Fix bugs with rendering templates:

    • Default arguments can now use other argument replacements.
    • Arguments are now properly replaced in wikilink and external links.

v0.2

23 Dec 20:27
Compare
Choose a tag to compare
  • Add support for the Header and Attribute nodes.
  • WikicodeToHtmlComposer optionally supports a output stream. Calling compose() no longer returns the string directly.
  • Support attributes for Tag nodes.
  • Many bugs fixed (in particular around complex lists and tables).

v0.1

23 Dec 20:26
Compare
Choose a tag to compare
  • Basic support for converting parsed MediaWiki wikicode to HTML.