You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The link trail depends on the language. For example, the one on the English Wikipedia is different from the Ukrainian one.
The filter_wikilinks method should maybe accept the link trail as an argument, otherwise no trail would be recognized.
filter_wikilinks doesn't do any actual work, it just navigates the tree. This would have to be an argument to mwparserfromhell.parse... I'm really uncomfortable about adding site-specific arguments like this to that function. Maybe we should consider the current behavior correct?
@earwig you're right, the link trail would have to be passed to mwparserfromhell.parse.
The maintainability of the parser shouldn't be affected as long as it does not implement any site-specific logic. The link trail is a standard MediaWiki feature, and anyway it would be up to the mwparserfromhell users (or to the maintainers of complementary frameworks such as Pywikibot) to pass the appropriate link trail to the parser.
For wikicode
[[link]]s
filter_wikilinks returns[[link]]
- it should[[link]]s
or[[link|links]]
.The text was updated successfully, but these errors were encountered: