This string is parsed incorrectly by ends_with_semicolon: julia> REPL.ends_with_semicolon("W = W' * W; # comment") false My guess is the single apostrophe (adjoint operator) is interpreted as a quote.