Surface.Formatter.Phases.Indent (SurfaceFormatter v0.7.5) View Source
Adds indentation nodes (:indent
and :indent_one_less
) where appropriate.
Surface.Formatter.Render.node/2
is responsible for adding the appropriate
level of indentation. It keeps track of the indentation level based on how
"nested" a node is. While running Formatter Phases, it's not necessary to
keep track of that detail.
:indent_one_less
exists to notate the indentation that should occur before
a closing tag, which is one less than its children.
Relies on Newlines
phase, which collapses :newline nodes to at most 2 in a row.
Link to this section Summary
Functions
Callback implementation for Surface.Formatter.Phase.run/2
.
Link to this section Functions
Callback implementation for Surface.Formatter.Phase.run/2
.