-
Notifications
You must be signed in to change notification settings - Fork 7
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
adds extra newlines between comment lines on output #5
Comments
Thanks for this! I hadn't noticed |
Shebang option support sounds awesome. Actually I was going to ask you to add support for this, I'm super happy to see it's already there. I've created an issue to add documentation for this feature to boot-fmt. |
Sure, I will be glad to provide a version of |
Sorry I meant "commit", not comment: 7c93439#diff-55867f69b1a11ee1474a25191d2d82e8R9 :) |
Hi! Neat library. I'm sure glad you did this, since I know nothing about boot. I wouldn't have known where to even begin. I had to install boot to even try it!
This particular issue -- the extra newlines between all of my
;; comment
lines, is because you are using:parse-string-all?
with:interpose
. Turns out that:parse-string-all?
was added for @viebel (the fellow who wroteklipse
), as he wanted to use zprint to format multiple forms in a single string. I don't know if he ended up using it or not, but the:parse-string-all?
isn't friendly to anything between forms in the string. Rather, it treats them all alike, and puts the:interpose
between all of them.I am pretty sure you could use
zprint.core/zprint-file
, since at a quick look boot-fmt is operating on files. It doesn't mess with the formatting of anything that is considered "whitespace" in the file, and is whatlein-zprint
uses. I would have no problem making that part of the documented API if you use it.That would also give you support for the
;!zprint {<options-map}
capability for free. In case you haven't looked into it, the;!zprint {<options-map>}
capability lets you put a comment in your source that changes the formatting for just the next function definition. For details, see thelein-zprint
readme. I put it in because I was doing my own files, and found some functions that really needed something other than the default formatting. If you don't want the;!zprint
comments to work [I'll be sad, but] you can still usezprint-file
(sort of) in one of two ways.zprint-file
but don't want;!zprint support
, and I'll add an argument tozprint-file
to do what it does now w/out;!zprint
support.zprint-file
yourself and change the call toprocess-multiple-forms
so that:process-bang-zprint?
isfalse
. I don't know how hard that would be to get it to link up with the other stuff inzprint.core
, but it would probably be possible.If you don't want
;!zprint
support, I would prefer that you ask for the change tozprint-map
, and I'll get it in the next release (due this weekend, I hope).The text was updated successfully, but these errors were encountered: