> The problem with the above input can be seen in either text or > PostScript output in groff 1.22.2. Using nroff, the output is
I think you're using the diversion wrong. Diversions are meant for storing *formatted* text. If you're not replaying the diversion in no-fill mode (and you're not), you will get all sorts of problems with spaces from indents. (And line-numbering is also something that happens during formatting.) It is possible that the solution better suited to your purposes (you might provide some explanation what you're trying to achieve) is storing unformatted text in a macro, like thus: Text before macro. Text before macro. .de my_macro Stored text. Stored text. Stored text. .. .my_macro Text after macro. Text after macro. If that's not what you're trying to do, you can switch to a different environment for the diversion. Since numbering is associated with the environment, the diversion will then not be line-numbered by default.