That "gap" has nothing to do with Moodle or its HTML editor. It is just the normal vertical separator between 2 consecutive paragraphs.
What you call a "line" is in fact a paragraph (consisting of one line).
If you are creating a "series" of "lines", then you might consider formatting them as lists instead of paragraphs.
1.- Series of one-line paragraphs:
one
two
three
...
2.- Series of lines separated by a linebreak:
one
two
three
3.- Ordered list:
- one
- two
- three
4.- Unordered (bulleted) list:
- one
- two
- three
Joseph