Boris Johnson referred to David Cameron as a “girly swot” in a recent cabinet paper, an unredacted version of court documents has shown, prompting condemnation of the prime minister for sexist insults.

During his inaugural prime minister’s questions on Wednesday, Johnson seemed to call Jeremy Corbyn “You great big girl’s blouse” in relation to the Labour leader’s refusal to back an immediate general election.

The other reference dates back to 16 August, appearing in a handwritten note about the idea of suspending parliament for five weeks.

The document was initially revealed on Thursday by Downing Street as it resisted legal challenges in Edinburgh and London to the prorogation of parliament, both of which cases were eventually won by No 10.

The version released to the courts showed Johnson added a handwritten note to argue that the suspension had limited impact given MPs only sit briefly in September after the summer recess before stopping again for the autumn conference season.

“The whole September session is a rigmarole introduced [redacted] to show the public that MPs were earning their crust,” the court-released version said. However, a full copy of the document, leaked to Sky News, shows the missing words were “by girly swot Cameron”.

There was no apparent legal or security reason to remove the words, leading to the assumption it was done to minimise potential embarrassment to Johnson.

In past years the Commons would remain in recess without a break through summer until beyond the party conferences in mid-October. The brief sitting period was introduced and then abandoned under Labour, and resurrected by Cameron, amid complaints about the recess length.

It is not the first time Johnson has used the insult about the former prime minister. In 2013, when he was London mayor, Johnson called Cameron and his brother, Jo, “girly swots” for gaining first-class degrees at university, when the current prime minister had to make do with a 2:1.

Earlier this week Johnson was criticised after seeming to say, as Corbyn spoke during prime minister’s question, “Call an election, you great big girl’s blouse.”

The revelation of the latest insult prompted scorn from Labour MPs. The party’s deputy leader, Tom Watson, tweeted: “It’s like this particular cohort of Bullingdon Club and Old Etonians hit their emotional plateau before graduation from Oxford. Johnson and Rees-Mogg in particular see politics as a game.”

Alison McGovern, the Wirral South MP, tweeted: “‘Big girl’s blouse’, ‘Girly swot’. What is it about big smart women Boris Johnson doesn’t like?”