diff --git a/src/plugins/git/githighlighters.cpp b/src/plugins/git/githighlighters.cpp index 50bd6cc2cfa..12153a91d5a 100644 --- a/src/plugins/git/githighlighters.cpp +++ b/src/plugins/git/githighlighters.cpp @@ -56,7 +56,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text) { // figure out current state State state = static_cast(previousBlockState()); - if (text.isEmpty()) { + if (text.trimmed().isEmpty()) { if (state == Header) state = Other; setCurrentBlockState(state);