🎉 initiate project *astro_rewrite*
This commit is contained in:
		
							parent
							
								
									ffd4d5e86c
								
							
						
					
					
						commit
						2ba37bfbe3
					
				
					 8658 changed files with 2268794 additions and 2538 deletions
				
			
		
							
								
								
									
										24
									
								
								node_modules/vscode-html-languageservice/lib/esm/services/htmlLinkedEditing.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								node_modules/vscode-html-languageservice/lib/esm/services/htmlLinkedEditing.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| /*--------------------------------------------------------------------------------------------- | ||||
|  *  Copyright (c) Microsoft Corporation. All rights reserved. | ||||
|  *  Licensed under the MIT License. See License.txt in the project root for license information. | ||||
|  *--------------------------------------------------------------------------------------------*/ | ||||
| import { Range } from '../htmlLanguageTypes'; | ||||
| export function findLinkedEditingRanges(document, position, htmlDocument) { | ||||
|     const offset = document.offsetAt(position); | ||||
|     const node = htmlDocument.findNodeAt(offset); | ||||
|     const tagLength = node.tag ? node.tag.length : 0; | ||||
|     if (!node.endTagStart) { | ||||
|         return null; | ||||
|     } | ||||
|     if ( | ||||
|     // Within open tag, compute close tag
 | ||||
|     (node.start + '<'.length <= offset && offset <= node.start + '<'.length + tagLength) || | ||||
|         // Within closing tag, compute open tag
 | ||||
|         node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + tagLength) { | ||||
|         return [ | ||||
|             Range.create(document.positionAt(node.start + '<'.length), document.positionAt(node.start + '<'.length + tagLength)), | ||||
|             Range.create(document.positionAt(node.endTagStart + '</'.length), document.positionAt(node.endTagStart + '</'.length + tagLength)) | ||||
|         ]; | ||||
|     } | ||||
|     return null; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 sindrekjelsrud
						sindrekjelsrud