remove unnecessary regex, use encodeuri for label instead of replace
This commit is contained in:
		
							parent
							
								
									a14d06aa3d
								
							
						
					
					
						commit
						9292de6333
					
				
					 5 changed files with 5 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
        {{$src = replace $src " " "-"}}
 | 
			
		||||
 | 
			
		||||
        <li>
 | 
			
		||||
            <a href="{{$src | safeHTML}}">{{index . "source"}}</a>
 | 
			
		||||
            <a href="{{$src}}">{{index . "source"}}</a>
 | 
			
		||||
        </li>
 | 
			
		||||
    {{- end -}}
 | 
			
		||||
    {{else}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -184,7 +184,7 @@
 | 
			
		|||
  const labels = graphNode.append("text")
 | 
			
		||||
    .attr("dx", 12)
 | 
			
		||||
    .attr("dy", ".35em")
 | 
			
		||||
    .text((d) => d.id.replace("%20", " "))
 | 
			
		||||
    .text((d) => encodeURI(d.id))
 | 
			
		||||
    .style("opacity", 0)
 | 
			
		||||
    .style("pointer-events", "none")
 | 
			
		||||
    .call(drag(simulation));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue