Worked example
Before
alpha
beta
gammaAfter
1. alpha
2. beta
3. gammaDefault numbering starts at one, advances by one, and inserts a period plus space.
Exactly what this changes
- Each included line receives the current integer, then the sequence advances by the chosen non-zero step. Positive or negative safe integers are accepted for both the start and step, allowing ascending or descending labels.
- The separator is inserted literally between the formatted number and original line. Line text, order, spacing, Unicode composition, and the final line ending are otherwise preserved. No value is parsed from the line itself.
- Optional zero padding sets a minimum digit width from 0 through 12. A negative sign remains before the padded digits. PlainSift validates every generated value and stops with an error rather than producing NaN or infinity.
Options and edge cases
- Choose whether blank lines receive a number. When blank lines are skipped, they remain in place and do not advance the counter; the next nonblank line receives the next sequence value.
- A step of zero is rejected because it would repeat one label. Decimal values and unsafe integers are also rejected, and an invalid setting leaves the existing input and output untouched.
Edge case: Padding describes the digits only, not the sign or separator. Very large starts and steps are checked against JavaScript’s safe integer range before each numbered line is produced.