Joel de Guzman <joel <at> boost-consulting.com> writes:

> >>> We need a program options flag for this which defaults
> >>> to 4 spaces. Thoughts?
[snip]
> I took a peek at the code, and, alas... it's innevitable, we need
> to handle tabs. Take a peek at list_format_action, for example.
> The quickbook syntax relies on block layout (ala python) in
> certain places such as list handling. We can issue a warning,
> sure, but we'll still have to correctly handle them when they
> are present, otherwise, block formatting will go awry.

I found a tabs to spaces regex algorithm in The Perl Cookbook.
I think Boost regex can do this too.

while ($string =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e {
  # spin in empty loop until substitution fails
}

Obviously switch 8 for tabwidth,

Thomas






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to