src/properties.c

changeset 1668
3ffdfe1776b4
parent 1603
ffea41207599
child 1670
56f55f2f70c0
equal deleted inserted replaced
1667:608cc0b25352 1668:3ffdfe1776b4
110 cxstring input = cx_strn(prop->input.space + prop->input.pos, 110 cxstring input = cx_strn(prop->input.space + prop->input.pos,
111 prop->input.size - prop->input.pos); 111 prop->input.size - prop->input.pos);
112 cxstring nl = cx_strchr(input, '\n'); 112 cxstring nl = cx_strchr(input, '\n');
113 while (nl.length > 0) { 113 while (nl.length > 0) {
114 // check for line continuation 114 // check for line continuation
115 char previous = nl.ptr > input.ptr ? nl.ptr[-1] : prop->buffer.space[prop->buffer.size-1]; 115 char previous = nl.ptr > input.ptr ? nl.ptr[-1] : cx_strat(cx_bstr(&prop->buffer), -1);
116 if (previous == continuation) { 116 if (previous == continuation) {
117 // this nl is a line continuation, check the next newline 117 // this nl is a line continuation, check the next newline
118 nl = cx_strchr(cx_strsubs(nl, 1), '\n'); 118 nl = cx_strchr(cx_strsubs(nl, 1), '\n');
119 } else { 119 } else {
120 break; 120 break;

mercurial