On Thu, Nov 03, 2005 at 07:43:13PM -0500, James Vega <[EMAIL PROTECTED]> was heard to say: > --- desc_parse.cc 2005-10-05 02:55:21.000000000 -0400 > +++ desc_parse.cc.new 2005-11-03 19:38:10.000000000 -0500 > @@ -127,7 +127,12 @@ > wstring bullet; > bullet+=(L"*+-"[level%3]); > > - start=loc2+2; > + loc2++; > + while(loc2<desc.size() && desc[loc2] != L' ') > + { > + loc2++; > + } > + start=loc2; > > fragment *item_contents=make_level_fragment(desc, > level+1,
Hmm, that looks to me like it'll ignore the entire first line of lists bulleted like comix's. The attached patch should work better, and it also handles arbitrary amounts of indentation after a bullet. Daniel
Fri Nov 4 12:02:14 EST 2005 Daniel Burrows <[EMAIL PROTECTED]> * When parsing descriptions, handle any number of spaces following a bullet (as long as the whole bullet item is indented consistently). diff -rN -udp old-aptitude/src/desc_parse.cc new-aptitude/src/desc_parse.cc --- old-aptitude/src/desc_parse.cc 2005-11-04 12:05:20.000000000 -0500 +++ new-aptitude/src/desc_parse.cc 2005-11-04 12:05:13.000000000 -0500 @@ -127,11 +127,18 @@ static fragment *make_level_fragment(con wstring bullet; bullet+=(L"*+-"[level%3]); - start=loc2+2; + start = loc2+1; + int indent_beyond_bullet = 0; + + while(start < desc.size() && desc[start] == L' ') + { + ++start; + ++indent_beyond_bullet; + } fragment *item_contents=make_level_fragment(desc, level+1, - nspaces2+2, + nspaces2 + 1 + indent_beyond_bullet, start); fragments.push_back(style_fragment(text_fragment(bullet),
signature.asc
Description: Digital signature