analyse_python.handle_option_state_row
convert.analyse_python.handle_option_state_row(
row_num,
stripped,
option_rows,
state,
)Process a row while the parser is in the ‘chunk options’ region.
This function classifies leading blank lines, Quarto chunk options (#| ...), and regular comments as option rows. It also updates per-block state such as chunk_eval and is_valuebox.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| row_num | int | Zero-based row index in the full document. | required |
| stripped | str | Line content with leading whitespace removed. | required |
| option_rows | set of int | Set being populated with row indices belonging to the options region of this block. | required |
| state | dict | Mutable analysis state for the current block. | required |
Returns
| Name | Type | Description |
|---|---|---|
| bool | True if the row was handled as an option row and the caller should remain in the options region; False if this row marks the transition into the code region. |