fix anchor tags where href and content are the same
This commit is contained in:
		 Wonder Collective
					Wonder Collective
				
			
				
					committed by
					
						 Cadence Ember
						Cadence Ember
					
				
			
			
				
	
			
			
			 Cadence Ember
						Cadence Ember
					
				
			
						parent
						
							e0d96cde19
						
					
				
				
					commit
					7a9e1168fe
				
			| @@ -126,6 +126,7 @@ turndownService.addRule("inlineLink", { | |||||||
| 		if (node.getAttribute("data-message-id")) return `https://discord.com/channels/${node.getAttribute("data-guild-id")}/${node.getAttribute("data-channel-id")}/${node.getAttribute("data-message-id")}` | 		if (node.getAttribute("data-message-id")) return `https://discord.com/channels/${node.getAttribute("data-guild-id")}/${node.getAttribute("data-channel-id")}/${node.getAttribute("data-message-id")}` | ||||||
| 		if (node.getAttribute("data-channel-id")) return `<#${node.getAttribute("data-channel-id")}>` | 		if (node.getAttribute("data-channel-id")) return `<#${node.getAttribute("data-channel-id")}>` | ||||||
| 		const href = node.getAttribute("href") | 		const href = node.getAttribute("href") | ||||||
|  | 		if (href === content) return href | ||||||
| 		let brackets = ["", ""] | 		let brackets = ["", ""] | ||||||
| 		content = content.replace(/ @.*/, "") | 		content = content.replace(/ @.*/, "") | ||||||
| 		if (href.startsWith("https://matrix.to")) brackets = ["<", ">"] | 		if (href.startsWith("https://matrix.to")) brackets = ["<", ">"] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user