Surface.Formatter.Phases.SpacesToNewlines (SurfaceFormatter v0.7.5) View Source
In a variety of scenarios, converts :space nodes to :newline nodes.
(Below, "element" means an HTML element or a Surface component.)
- If an element contains other elements as children, surround it with newlines.
- If there is a space after an opening tag or before a closing tag, convert it to a newline.
- If there is a closing tag on its own line, ensure there's a newline before the next sibling node.
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
.