Changeset 10278
- Timestamp:
- Feb 18, 2015, 9:56:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Loader.cc
r10273 r10278 470 470 //A newline directly after square brackets is ignored. To make sure that the string is printed 471 471 //exactly as it is, including newlines at the beginning, insert a space after the brackets. 472 output << "print([" + equalSigns + "[ " + temp + ']' + equalSigns +"])"; 472 bool needsExtraSpace = false; 473 if (temp.size() > 0 && (temp[0] == '\n' || temp[0] == '\r')) // begins with \n or \r (a line break) 474 needsExtraSpace = true; 475 output << "print([" + equalSigns + (needsExtraSpace ? "[ " : "[") + temp + ']' + equalSigns +"])"; 473 476 start = end + 5; 474 477 }
Note: See TracChangeset
for help on using the changeset viewer.