mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	help-beta: Merge lists of same type adjacent to each other.
Fixes #31252. One of our major use cases for file imports is to have bullet points as partials to import at different places in the project. But when importing the file with Astro, it creates its own lists. So we merge lists together if they have nothing but whitespace between them. There were some talks to use a component called FlattenList that would flatten the list inside it, but that would also flatten lists that were nested on purpose. This approach while feeling a bit hacky would not flatten nested lists.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							c0a2b2a31d
						
					
				
				
					commit
					b813d868a7
				
			@@ -176,6 +176,10 @@ def run() -> None:
 | 
			
		||||
    include_source_dir = os.path.join(BASE_DIR, "help/include")
 | 
			
		||||
    include_destination_dir = os.path.join(BASE_DIR, "help-beta/src/content/docs/include")
 | 
			
		||||
    shutil.copytree(include_source_dir, include_destination_dir)
 | 
			
		||||
 | 
			
		||||
    # We do not want Astro to render these include files as standalone
 | 
			
		||||
    # files, prefixing them with an underscore accomplishes that.
 | 
			
		||||
    # https://docs.astro.build/en/guides/routing/#excluding-pages
 | 
			
		||||
    for name in os.listdir(include_destination_dir):
 | 
			
		||||
        os.rename(
 | 
			
		||||
            os.path.join(include_destination_dir, name),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user