enableSpaceMode
Sets current indentation level to be the same as that of the last pushSpace.
Function parameters
Parameters
Type definitions in this namespace
Types
Functions in this namespace
Functions
Error sets in this namespace
Error Sets
Source
Implementation
pub fn enableSpaceMode(ais: *AutoIndentingStream, space: Space) void {
if (ais.space_stack.items.len == 0) return;
const curr = ais.space_stack.getLast();
if (curr.space != space) return;
ais.space_mode = curr.indent_count;
}