- 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
andsafesubst
. - 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.
Warning
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
, andnoinclude
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.
- Fix escaping HTML entities in text (e.g. convert
<
to<
). - 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.
- Stop modifying the mwparserfromhell library.
- Remove obsolete methods to directly handle a
list
ortuple
in theWikicodeToHtmlComposer
- Fix bugs with rendering templates:
- Default arguments can now use other argument replacements.
- Arguments are now properly replaced in wikilink and external links.
- Add support for the Header and Attribute nodes.
WikicodeToHtmlComposer
optionally supports a output stream. Callingcompose()
no longer returns the string directly.- Support attributes for
Tag
nodes. - Many bugs fixed (in particular around complex lists and tables).
- Basic support for converting parsed MediaWiki wikicode to HTML.