@@ -85,18 +85,38 @@ def generate_docs():
8585 for f in out .glob ("**/*.html" ):
8686 f .rename (f .with_suffix (".md" ))
8787
88+
8889def clean_mdx_content (content : str ) -> str :
89- parts = re .split (r' (```[\s\S]*?```)' , content )
90-
90+ parts = re .split (r" (```[\s\S]*?```)" , content )
91+
9192 cleaned_parts = []
9293 for part in parts :
9394 if part .startswith ("```" ):
94- cleaned_parts .append (part )
95+ text = (
96+ part .replace ("<" , "<" )
97+ .replace (">" , ">" )
98+ .replace ("'" , "'" )
99+ .replace ("builtins." , "" )
100+ .replace ("fishjam.api._client." , "" )
101+ .replace ("fishjam.api._fishjam_client." , "" )
102+ .replace ("fishjam.events._protos.fishjam." , "" )
103+ .replace ("fishjam._openapi_client.models.peer." , "" )
104+ .replace ("fishjam._openapi_client.models.peer_metadata." , "" )
105+ .replace ("fishjam._openapi_client.models.peer_status." , "" )
106+ .replace ("fishjam._openapi_client.models.peer_type." , "" )
107+ .replace ("fishjam._openapi_client.models.room_config." , "" )
108+ .replace ("fishjam._openapi_client.models.room_config_room_type." , "" )
109+ .replace ("fishjam._openapi_client.models.room_config_video_codec." , "" )
110+ .replace ("fishjam._openapi_client.models.subscriptions." , "" )
111+ .replace ("fishjam._openapi_client.models.subscribe_mode." , "" )
112+ .replace ("fishjam._openapi_client.models.track." , "" )
113+ .replace ("fishjam._openapi_client.types." , "" )
114+ )
115+ cleaned_parts .append (text )
95116 else :
96117 text = part .replace ("{" , "\\ {" ).replace ("}" , "\\ }" )
97- text = text .replace ("<" , "<" )
98118 cleaned_parts .append (text )
99-
119+
100120 return "" .join (cleaned_parts )
101121
102122
@@ -133,6 +153,11 @@ def generate_docusaurus():
133153
134154 dest_path .write_text (safe_content , encoding = "utf-8" )
135155
156+ fishjam_dir = out / "fishjam"
157+ submodules_dir = out / "submodules"
158+
159+ fishjam_dir .rename (submodules_dir )
160+
136161
137162def update_client ():
138163 if len (sys .argv ) < 2 :
0 commit comments