Home

multiindenter

Multiindenter is a software component or library that manages and applies multiple indentation rules within a single text stream. It is designed for editors, formatters, or compilers that must handle documents or code blocks with distinct indentation conventions, such as mixed-language files or literate programming formats.

The core concept of a multiindenter is a registry of indentation policies. Each policy specifies how to

Key features commonly associated with multiindenter include language-aware indentation, support for multiple styles within one document

Typical use cases involve files that combine code blocks in different languages (such as HTML with embedded

compute
indentation
levels
for
a
particular
language,
block
type,
or
region.
A
context-aware
engine
selects
the
appropriate
policy
based
on
syntax
cues,
file
type,
or
explicit
region
markers,
and
then
applies
or
reflows
indentation
accordingly.
The
system
typically
supports
reading
configuration
data
that
defines
tab
handling,
indentation
width,
and
constraints
like
maximum
or
minimum
indentation
levels.
It
may
also
track
an
indentation
stack
to
manage
nested
blocks
and
dedentation
events.
(for
example,
spaces
versus
tabs),
automatic
re-indentation
during
edits,
and
the
ability
to
integrate
with
editors,
IDEs,
or
batch
tooling
via
APIs
or
command-line
interfaces.
It
often
provides
extensibility
through
pluggable
policies,
allowing
users
to
add
new
language
rules
or
customize
existing
ones
without
altering
the
core
engine.
CSS/JavaScript),
notebooks
or
literate
programming
documents,
and
complex
configuration
files
that
mix
structured
blocks.
Limitations
can
include
ambiguity
in
regions
lacking
clear
markers
and
performance
considerations
for
large
files
or
highly
nested
structures.
See
also
indentation,
code
formatter,
and
language-aware
editing.