HF RL Explorer

TOC hook fails with UnboundLocalError when heading id is None

TOC hook fails with UnboundLocalError when heading id is None: a task in harness-adapters: Agentic coding environments (Harbor dataset). When using the TOC hook without providing a custom heading id function, the code raises an UnboundLocalError because the default heading id function is not…

The task

When using the TOC hook without providing a custom `heading_id` function, the code raises an `UnboundLocalError` because the default `heading_id` function is not properly defined before it's used.

Part of harness-hub/harness-adapters.