Skip to content

Commit b477159

Browse files
committed
Update CConsole.h
1 parent a281b88 commit b477159

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CConsole/src/CConsole.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,27 @@ typedef unsigned short WORD;
113113
Also I think that checking how the indentation changes after an error is logged is also helpful because
114114
usually if something fails, then the indentation is expected to be decreased and some other error
115115
might be also logged, and whenever the indentation increases we most probably left that code area
116-
which handled the failure so we can print out the fifo buffer.
116+
which handled the failure so we can print out the fifo buffer.
117+
118+
D) Non-breakable spaces are not always put into html log file.
119+
Consider the following example:
120+
OLn("apple banana");
121+
The number of spaces will be correct in the console window, but only 1 space will be visible in the
122+
html log file.
123+
124+
Workaround:
125+
O("apple");
126+
O(" ");
127+
OLn("banana");
128+
129+
Possible Solution:
130+
I've just quickly checked and saw CConsoleImpl::WriteText() puts nbsp characters only when the whole
131+
given string consists of space characters only. I think this should be changed: anywhere in the string
132+
where we find more than 1 spaces next to each other, nbsp chars should be inserted into the html file.
133+
Also it is worth noting that if the string is a formatter string (contains %), then the big switch-case
134+
of WriteFormattedTextEx() will be executed instead of WriteText(), and that switch case walks the string
135+
char-by-char. Similar logic should be inserted there as well: if we are encountering a space char right
136+
after another space char, we should write nbsp to the html file instead of regular space char.
117137
*/
118138

119139
class CConsole

0 commit comments

Comments
 (0)