mirror of
				https://github.com/theoludwig/markdownlint-rule-relative-links.git
				synced 2025-09-09 19:39:29 +02:00 
			
		
		
		
	fix: ignore absolute paths /absolute/path
				
					
				
			This commit is contained in:
		| @@ -71,7 +71,8 @@ const customRule = { | ||||
|         if (hrefSrc != null) { | ||||
|           const url = new URL(hrefSrc, pathToFileURL(params.name)) | ||||
|           url.hash = '' | ||||
|           const isRelative = url.protocol === 'file:' | ||||
|           const isRelative = | ||||
|             url.protocol === 'file:' && !hrefSrc.startsWith('/') | ||||
|           if (isRelative && !fs.existsSync(url)) { | ||||
|             const detail = `Link "${hrefSrc}" is dead` | ||||
|             addError(onError, lineNumber, detail) | ||||
|   | ||||
							
								
								
									
										2
									
								
								test/fixtures/Valid.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								test/fixtures/Valid.md
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,8 @@ | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| [External https link](https://example.com/) | ||||
|  | ||||
| [External https link 2](https:./external.https) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user