Skip to content

Commit

Permalink
Extend comment on formatting action ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans authored and jeapostrophe committed Apr 5, 2023
1 parent b77ed7e commit d782369
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion text-document.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,11 @@
null
(append (filter-map
identity
; NOTE: The order is important somehow
;; NOTE: The order is important here.
;; `remove-trailing-space!` deletes content relative to the initial document
;; position. If we were to instead call `indent-line!` first and then
;; `remove-trailing-space!` second, the remove step could result in
;; losing user entered code.
(list (remove-trailing-space! mut-doc-text skip-this-line? line)
(indent-line! mut-doc-text indenter line #:on-type? on-type?)))
(loop (add1 line)))))))
Expand Down

0 comments on commit d782369

Please sign in to comment.