mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Add insert_* overloads that accept both location and end_location
				
					
				
			This commit is contained in:
		
							parent
							
								
									e8c0f49cb8
								
							
						
					
					
						commit
						3b11491cea
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -21,6 +21,14 @@ class Ameba::Source
 | 
			
		|||
      @rewriter.remove(loc_to_pos(location), loc_to_pos(end_location) + 1)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def insert_before(location, end_location, content)
 | 
			
		||||
      @rewriter.insert_before(loc_to_pos(location), loc_to_pos(end_location) + 1, content)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def insert_after(location, end_location, content)
 | 
			
		||||
      @rewriter.insert_after(loc_to_pos(location), loc_to_pos(end_location) + 1, content)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def insert_before(location, content)
 | 
			
		||||
      @rewriter.insert_before(loc_to_pos(location), content)
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue