Expand description
Source text editing heuristics.
This crate has a single responsibility: provide reusable source-text heuristics for insertion points and lightweight display helpers.
Functionsยง
- find_
import_ insert_ position - Find import insertion position after shebang and existing import/require lines.
- find_
pragma_ insert_ position - Find pragma insertion position (just after shebang if present).
- find_
statement_ start - Find the start byte offset of the current statement at
pos. - get_
indent_ at - Return indentation (leading spaces/tabs) for the line containing
pos. - has_
non_ ascii_ content - Return true when
sourcecontains non-ASCII content. - truncate_
expr - Truncate an expression for display with
...suffix when required.