@@ -92,7 +92,7 @@ def convert_rst_links(text, page_info):
9292 if "package_name" not in page_info :
9393 raise ValueError ("`page_info` must contain at least the package_name." )
9494 package_name = page_info ["package_name" ]
95- version = page_info .get ("version" , "master " )
95+ version = page_info .get ("version" , "main " )
9696 language = page_info .get ("language" , "en" )
9797 no_prefix = page_info .get ("no_prefix" , False )
9898
@@ -116,7 +116,7 @@ def convert_rst_links(text, page_info):
116116
117117 # Links with a prefix
118118 # TODO: when it exists, use the API to deal with prefix links properly.
119- prefix = f"https://github.com/huggingface/{ package_name } /tree/master /"
119+ prefix = f"https://github.com/huggingface/{ package_name } /tree/main /"
120120 text = _re_prefix_links .sub (rf"[\1]({ prefix } \2)" , text )
121121 # Other links
122122 text = _re_links .sub (r"[\1](\2)" , text )
@@ -220,7 +220,7 @@ def convert_rst_blocks(text, page_info):
220220 if "package_name" not in page_info :
221221 raise ValueError ("`page_info` must contain at least the package_name." )
222222 package_name = page_info ["package_name" ]
223- version = page_info .get ("version" , "master " )
223+ version = page_info .get ("version" , "main " )
224224 language = page_info .get ("language" , "en" )
225225
226226 lines = text .split ("\n " )
0 commit comments