Indeed, The extract_html value of https://nn.wikipedia.org/api/rest_v1/page/summary/Ragnar_Frisch is
<p><b>Ragnar Anton Kittil Frisch</b></p>\n<pre>var ein nyskapande norsk økonom. </pre>
The problem also occurs in Visual editor mode. It could be related to the use of brackets in the template, as a similar template where brackets are added manually (Mal:Datoar) does not get the unwanted linebreak and pre-formatting. It does, however, get an unexpected space added after it.