|
Asper Header
1.0.16
The header injector extension
|
Scans document to detect existing header presence and boundaries.
Scans document to detect existing header presence and boundaries
| comments | Array of comment prefixes [opener, middle, closer] |
Searches the document within maxScanLength lines for header opener and closer patterns. Sets headerInnerStart and headerInnerEnd properties when valid header is found. Detects broken headers (mismatched/missing opener/closer).
Determines insertion line offset for header placement
| document | VS Code text document to analyze |
Detects the presence of shebang (#!) lines at the start of the document and returns appropriate insertion offset. Shebangs must remain as the first line of executable scripts, so headers are inserted after them when present.
script with shebang: