Raxol. Debug. DiffFormatter
(Raxol v2.6.0)
View Source
Pure functions for formatting Snapshot changes into styled display lines.
Converts the {:changed, path, old, new}, {:added, path, val}, and
{:removed, path, val} tuples from Snapshot.diff/2 into text lines
with color indicators suitable for the debugger UI.
Summary
Functions
Formats a list of Snapshot changes into displayable lines.
Formats a key path list into a readable dot-separated string.
Formats a snapshot's internal diff (model_before vs model_after).
Renders a formatted line into a display string with prefix indicator.
Types
Functions
@spec format_changes([Raxol.Debug.Snapshot.change()]) :: [formatted_line()]
Formats a list of Snapshot changes into displayable lines.
Parameters
changes- List ofSnapshot.change()tuples
Returns
List of formatted_line() maps.
Formats a key path list into a readable dot-separated string.
@spec format_snapshot_diff(Raxol.Debug.Snapshot.t()) :: [formatted_line()]
Formats a snapshot's internal diff (model_before vs model_after).
@spec render_line(formatted_line()) :: {String.t(), String.t()}
Renders a formatted line into a display string with prefix indicator.
Returns {prefix, text} where prefix is "+", "-", or "~".