mirror of https://github.com/sveltejs/svelte
				
				
				
			
							parent
							
								
									800f6c076b
								
							
						
					
					
						commit
						35221c8811
					
				@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					---
 | 
				
			||||||
 | 
					'svelte': patch
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fix: claim svg tags in raw mustache tags correctly
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 58 B  | 
| 
		 After Width: | Height: | Size: 106 B  | 
@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					export default {
 | 
				
			||||||
 | 
						snapshot(target) {
 | 
				
			||||||
 | 
							const svg = target.querySelector('svg');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								svg,
 | 
				
			||||||
 | 
								circle: svg.querySelector('circle')
 | 
				
			||||||
 | 
							};
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						test(assert, _, snapshot) {
 | 
				
			||||||
 | 
							assert.instanceOf(snapshot.svg, SVGElement);
 | 
				
			||||||
 | 
							assert.instanceOf(snapshot.circle, SVGElement);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 64 B  | 
@ -1,2 +1,4 @@
 | 
				
			|||||||
 | 
					<!-- HTML_TAG_START -->
 | 
				
			||||||
<p>this is some html</p>
 | 
					<p>this is some html</p>
 | 
				
			||||||
<p>and so is this</p>
 | 
					<p>and so is this</p>
 | 
				
			||||||
 | 
					<!-- HTML_TAG_END -->
 | 
				
			||||||
 | 
				
			|||||||
@ -1 +1,5 @@
 | 
				
			|||||||
 | 
					<script>
 | 
				
			||||||
 | 
						export let raw;
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{@html raw}
 | 
					{@html raw}
 | 
				
			||||||
@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					export default {
 | 
				
			||||||
 | 
						html: '',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						test({ assert, component, target }) {
 | 
				
			||||||
 | 
							component.show = true;
 | 
				
			||||||
 | 
							assert.equal(target.innerHTML, '<svg><circle cx="200" cy="500" r="200"></circle></svg>');
 | 
				
			||||||
 | 
							assert.instanceOf(target.querySelector('svg'), SVGElement);
 | 
				
			||||||
 | 
							assert.instanceOf(target.querySelector('circle'), SVGElement);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<script>
 | 
				
			||||||
 | 
						export let show = false;
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{#if show}
 | 
				
			||||||
 | 
						<svg>{@html '<circle cx="200" cy="500" r="200"></circle>'}</svg>
 | 
				
			||||||
 | 
					{/if}
 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue