htmlToMarkdown: unescape masked links
This commit is contained in:
		
							parent
							
								
									c6bbdaa69c
								
							
						
					
					
						commit
						a2f4344f5c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -61,7 +61,9 @@ function whenYouWalking(tree, images = true, embed = true) {
 | 
			
		|||
      } else if (content == link || link.replace(/^https?:\/\//, "") == content) {
 | 
			
		||||
        str += embed ? link : `<${link}>`;
 | 
			
		||||
      } else {
 | 
			
		||||
        str += `[${content}](${embed ? "" : "<"}${link}${embed ? "" : ">"}${alt != null ? ` "${alt}"` : ""})`;
 | 
			
		||||
        str += `[${content.replaceAll("\\", "")}](${embed ? "" : "<"}${link}${embed ? "" : ">"}${
 | 
			
		||||
          alt != null ? ` "${alt}"` : ""
 | 
			
		||||
        })`;
 | 
			
		||||
      }
 | 
			
		||||
    } else if (elem.b) {
 | 
			
		||||
      str += `**${whenYouWalking(elem.b, images, embed)}**`;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue