mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 18:08:03 +03:00 
			
		
		
		
	Fix up index suffixes
This commit is contained in:
		
							parent
							
								
									367dd01a33
								
							
						
					
					
						commit
						077f7fef9b
					
				| 
						 | 
				
			
			@ -65,5 +65,5 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir):
 | 
			
		|||
        if not os.path.exists(build_dir):
 | 
			
		||||
            os.makedirs(build_dir)
 | 
			
		||||
        output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index)
 | 
			
		||||
        output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1.html"', output)
 | 
			
		||||
        output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output)
 | 
			
		||||
        open(build_file, 'w').write(output.encode('utf-8'))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user