Understand the limitations of the direct source code interface
mainUnlike the MediaWiki engine which generates HTML and resolves template contents, mwparserfromhell acts as a direct interface to the raw source code only. This leads to the following behaviors:
- No Template Transclusion Awareness: The parser cannot see the contents of a template. If a template contains a closing tag (e.g.,
{{end-bold}}containing</b>), the parser will not recognize it and may treat the preceding tag as unfinished. - Link Adjacency: Templates placed immediately after external links (e.g.,
http://example.com{{foo}}) are treated as part of the link itself. - XML Tag Treatment: Any text that resembles an XML tag is treated as a tag, regardless of whether it is a recognized name, because valid tag names depend on specific MediaWiki extensions.
- Namespace and Link Limitations:
- Localized namespace names are not recognized; for example,
[[File:...]]is treated as a standard wikilink. Word-ending links(linktrail) are not supported due to their language-specific nature.
- Localized namespace names are not recognized; for example,