Line length issue when indenting multiple lines. #1

Closed
nateroling opened this Issue Oct 11, 2012 · 2 comments

Projects

None yet

2 participants

This works okay:

$ condent <<EOF

foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
EOF

foo.bar(baz)
foo.bar(baz)
foo.bar(baz)

...but if I add many lines, it starts to break them funny:

condent <<EOF

foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
EOF

foo.bar(
baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz)
foo.bar(baz,
)

Owner
Julian commented Oct 11, 2012

Heh. This is going to be because fixing multiple containers (or function calls in this case) at once isn't working yet, that's close to the top of my list. To do that is going to just require a bit of splitting.

The reason it isn't broken for a small number of lines is because those are short enough to coincidentally fit on one line (of course that's not what you'd want, but right now it will interpret all of those as a single container), and, that means they're going to be left alone.

I'll take a look at this in a couple of minutes, thanks for the report.

Owner
Julian commented Oct 12, 2012

Think this should be fixed in the (still messy but slightly better factored v0.2) rewrite that I just pushed. Let me know if you have any other issues :).

@Julian Julian closed this Oct 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment