repl: ignore empty lines

As discussed in #7217.