File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def parse_arguments():
4545def  refrepl (m , order ):
4646    # Rewrite reference links with the reordered link numbers. Insert the first 
4747    # character from the footnote reference link right before the new link. 
48-     return  "%s[^%s]"   %  ( m .group (0 )[:1 ],  order .index (m .group (2 )) +  1 ) 
48+     return  f" { m .group (0 )[:1 ]} [^ { order .index (m .group (2 )) +  1 } ]" 
4949
5050
5151def  sort_footnotes (text ):
@@ -67,7 +67,7 @@ def sort_footnotes(text):
6767
6868    # Make a list of the footnote-references in order of appearance the original footnotes in text. 
6969    # this is not the order of the footnote contents, but the order of the footnote references in the text. 
70-     newlabels  =  ["[^%s]: %s"    %  ( i   +   1 ,  labels [j ])  for  (i , j ) in  enumerate (order )]
70+     newlabels  =  [f "[^{ i + 1 } ]:  { labels [j ]} " for  (i , j ) in  enumerate (order )]
7171    # print(f"newlabels: {newlabels}") 
7272
7373    # Remove the old footnote-references and put the new ones at the end of the text. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments