List of steps to reproduce (step by step, including full links if applicable):
var api = new mw.Api(); var params = {format: 'json',action: 'parse',mobileformat:false,disablelimitreport:true,pst: '1',prop: 'text',formatversion: '2',text:'<div class="nomobile">this div has the nomobile class but mobileformat is disabled, so if you\'re not seeing this it\'s a bug.</div><div>You\'re not seeing it, are you?</div>'}; api.post( params ).done( function ( data ) {console.log(data.parse.text);});
As mobileformat is false it gets stripped which is expected. So you can just as well omit it, makes no difference.
What happens?:
On https://en.wikipedia.org/wiki/Main_Page:
<div class="mw-parser-output"><div class="nomobile">this div has the nomobile class but mobileformat is disabled, so if you're not seeing this it's a bug.</div><div>You're not seeing it, are you?</div></div>
On https://en.m.wikipedia.org/wiki/Main_Page:
<div class="mw-parser-output"><section class="mf-section-0" id="mf-section-0"><div>You're not seeing it, are you?</div></section></div>
What should have happened instead?:
Get both divs regardless of domain as mobileformat:false was specified. Or there should be a "nomobileformat" (or "desktopformat") option. Whatever. The only way to get wikitext parsed in desktop format on the mobile domain is using a super ugly hack.