tatuylonen / wikitextprocessor

Python package for WikiMedia dump processing (Wiktionary, Wikipedia etc). Wikitext parsing, template expansion, Lua module execution. For data extraction, bulk syntax checking, error detection, and offline formatting.
Other
94 stars 23 forks source link

Return empty string for `{{ns:0}}` and `{{ns:}}` #309

Closed xxyzz closed 2 months ago

xxyzz commented 2 months ago

This is required in ru edition's language title template "--lang--" to create language category link.

xxyzz commented 2 months ago

Previous code returns "Main" from these namespace JSON files. I forget why it uses "Main" for the namespace name, maybe it's always "Main" in our code.