"""
HTML post-processing script to insert RunLLM widget into documentation.
Based on: https://github.com/sgl-project/sglang/blob/499f5e620c243b6a9980b63f7aa54d096a9a3ddd/docs/wrap_run_llm.py
Copyright (c) 2023 SGLang Project (Apache 2.0 License)
"""
import os
import re
def insert_runllm_widget(html_content):
# RunLLM Widget script to be inserted for FlashInfer
widget_script = """
"""
# Find the closing body tag and insert the widget script before it
return re.sub(r"