Fixed an error in the xml writer, that occurred when two newlines
appear next to each other.
This commit is contained in:
parent
291d51af83
commit
c20cf5ebfd
1 changed files with 10 additions and 6 deletions
|
|
@ -1240,14 +1240,18 @@ namespace Cantera {
|
|||
while (1 > 0) {
|
||||
ieol = vv.find('\n');
|
||||
if (ieol != string::npos) {
|
||||
int jf = ieol - 1;
|
||||
for (int j = 0; j < (int) ieol; j++) {
|
||||
if (! isspace(vv[j])) {
|
||||
jf = j;
|
||||
break;
|
||||
if (ieol == 0) {
|
||||
s << endl << indent << " ";
|
||||
} else {
|
||||
int jf = ieol - 1;
|
||||
for (int j = 0; j < (int) ieol; j++) {
|
||||
if (! isspace(vv[j])) {
|
||||
jf = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
s << endl << indent << " " << vv.substr(jf,ieol-jf);
|
||||
}
|
||||
s << endl << indent << " " << vv.substr(jf,ieol-jf);
|
||||
vv = vv.substr(ieol+1);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue