If I write a footnote as follows:

```
abc\footnote{XYZ}

```

it doesn't leave a space after abc, which is ok. If I write as follows, with the hope of tidying up the source:

```
abc
\footnote{XYZ}

```

it leaves a space after abc.

Because footnotes are structurally separate from the text, it would be nice if I could keep them on their own lines in the source file, while preventing the space.

What is the best practice of source editing in this and similar cases?