ds26gte / scmindent

87 stars 12 forks source link

Don't leave trailing whitespaces when processing _empty_ lines #9

Closed iamFIREcracker closed 3 years ago

iamFIREcracker commented 4 years ago

Currently, when indenting a form that includes a bunch of empty lines, lispindent will leave some trailing whitespaces in there:

(asdf:defsystem #:cg
  :description "Matteo's command guesser"
⌴⌴
  :author "Matteo Landi <matteo@matteolandi.net>"
  :license  "MIT"

This PR fixes the problem, by making sure whitespaces are written on stdout only if the current line, after it's been trimmed of all the whitespaces, winds up to be non-empty.

(asdf:defsystem #:cg
  :description "Matteo's command guesser"

  :author "Matteo Landi <matteo@matteolandi.net>"
  :license  "MIT"
iamFIREcracker commented 3 years ago

This commit seems to fix this, so I am going to close this PR.

ds26gte commented 3 years ago

Oops, been busy on other stuff. Apologies and thanks!