Code formatting line breaks make parsing fail

Whenever my code formatter (prettier) break lines in hugo pregenerated files the compiler breaks with a message of “parse failed…”

very strange behaviour. there’s not much I can do but disable my formatter. must be a common issue.

any suggestion on how to control this?