Don't quote if no encoding is needed.
This commit is contained in:
parent
5c2d078b4f
commit
fa6c1dba06
@ -357,7 +357,8 @@ void word::generate(utility::outputStream& os, const string::size_type maxLineLe
|
|||||||
// - the whole buffer is ASCII-only
|
// - the whole buffer is ASCII-only
|
||||||
// - the buffer does not contain quoting character (")
|
// - the buffer does not contain quoting character (")
|
||||||
// - there is enough remaining space on the current line to hold the whole buffer
|
// - there is enough remaining space on the current line to hold the whole buffer
|
||||||
if ((flags & text::QUOTE_IF_POSSIBLE) &&
|
if (!noEncoding &&
|
||||||
|
(flags & text::QUOTE_IF_POSSIBLE) &&
|
||||||
asciiCount == m_buffer.length() &&
|
asciiCount == m_buffer.length() &&
|
||||||
m_buffer.find('"') == string::npos &&
|
m_buffer.find('"') == string::npos &&
|
||||||
(curLineLength + 2 /* 2 x " */ + m_buffer.length()) < maxLineLength)
|
(curLineLength + 2 /* 2 x " */ + m_buffer.length()) < maxLineLength)
|
||||||
|
Loading…
Reference in New Issue
Block a user