Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reformatting lists only seems to work on "reformat all paragraphs" mode #1

Open
rjbs opened this issue Apr 24, 2015 · 0 comments
Open

Comments

@rjbs
Copy link
Contributor

rjbs commented Apr 24, 2015

Consider this test program:

use strict;
use Text::Autoformat;

my $str = <<'END';
1. Analyze problem
2. Design algorithm
6. Code solution
4. Test
2. Ship
END

my $x = autoformat $str, {
  lists => 'number',
  all   => $ARGV[0] ? 1 : 0,
};

print $x;

It should always renumber the whole list, I think, but it must be told to use "all", meaning all paragraphs, to work. This means you can't effectively use it to format only the first paragraph, as the docs say. This is probably due to how paragraph boundary detection and numbered lists interface. (It clearly has to have some interaction to prevent from folding the above into one big line.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant