| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -48,7 +48,12 @@ const boolean_attributes = new Set([
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					export default function(node, renderer, options) {
 | 
					 | 
					 | 
					 | 
					export default function(node, renderer, options) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						let opening_tag = `<${node.name}`;
 | 
					 | 
					 | 
					 | 
						let opening_tag = `<${node.name}`;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						let textarea_contents; // awkward special case
 | 
					 | 
					 | 
					 | 
						let node_contents; // awkward special case
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						const contenteditable = (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							node.name !== 'textarea' &&
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							node.name !== 'input' &&
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							node.attributes.some((attribute: Node) => attribute.name === 'contenteditable')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						const slot = node.get_static_attribute_value('slot');
 | 
					 | 
					 | 
					 | 
						const slot = node.get_static_attribute_value('slot');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						const component = node.find_nearest(/InlineComponent/);
 | 
					 | 
					 | 
					 | 
						const component = node.find_nearest(/InlineComponent/);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -85,7 +90,7 @@ export default function(node, renderer, options) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									args.push(snip(attribute.expression));
 | 
					 | 
					 | 
					 | 
									args.push(snip(attribute.expression));
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								} else {
 | 
					 | 
					 | 
					 | 
								} else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									if (attribute.name === 'value' && node.name === 'textarea') {
 | 
					 | 
					 | 
					 | 
									if (attribute.name === 'value' && node.name === 'textarea') {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										textarea_contents = stringify_attribute(attribute, true);
 | 
					 | 
					 | 
					 | 
										node_contents = stringify_attribute(attribute, true);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									} else if (attribute.is_true) {
 | 
					 | 
					 | 
					 | 
									} else if (attribute.is_true) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
										args.push(`{ ${quote_name_if_necessary(attribute.name)}: true }`);
 | 
					 | 
					 | 
					 | 
										args.push(`{ ${quote_name_if_necessary(attribute.name)}: true }`);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									} else if (
 | 
					 | 
					 | 
					 | 
									} else if (
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -107,7 +112,7 @@ export default function(node, renderer, options) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								if (attribute.type !== 'Attribute') return;
 | 
					 | 
					 | 
					 | 
								if (attribute.type !== 'Attribute') return;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								if (attribute.name === 'value' && node.name === 'textarea') {
 | 
					 | 
					 | 
					 | 
								if (attribute.name === 'value' && node.name === 'textarea') {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									textarea_contents = stringify_attribute(attribute, true);
 | 
					 | 
					 | 
					 | 
									node_contents = stringify_attribute(attribute, true);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								} else if (attribute.is_true) {
 | 
					 | 
					 | 
					 | 
								} else if (attribute.is_true) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
									opening_tag += ` ${attribute.name}`;
 | 
					 | 
					 | 
					 | 
									opening_tag += ` ${attribute.name}`;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								} else if (
 | 
					 | 
					 | 
					 | 
								} else if (
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -136,6 +141,14 @@ export default function(node, renderer, options) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							if (name === 'group') {
 | 
					 | 
					 | 
					 | 
							if (name === 'group') {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								// TODO server-render group bindings
 | 
					 | 
					 | 
					 | 
								// TODO server-render group bindings
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							} else if (contenteditable && (name === 'text' || name === 'html')) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								const snippet = snip(expression)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								if (name == 'text') {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									node_contents = '${@escape(' + snippet + ')}'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								} else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									// Do not escape HTML content
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
									node_contents = '${' + snippet + '}'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
								}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							} else {
 | 
					 | 
					 | 
					 | 
							} else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								const snippet = snip(expression);
 | 
					 | 
					 | 
					 | 
								const snippet = snip(expression);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
								opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}';
 | 
					 | 
					 | 
					 | 
								opening_tag += ' ${(v => v ? ("' + name + '" + (v === true ? "" : "=" + JSON.stringify(v))) : "")(' + snippet + ')}';
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -150,8 +163,8 @@ export default function(node, renderer, options) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						renderer.append(opening_tag);
 | 
					 | 
					 | 
					 | 
						renderer.append(opening_tag);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if (node.name === 'textarea' && textarea_contents !== undefined) {
 | 
					 | 
					 | 
					 | 
						if ((node.name === 'textarea' || contenteditable) && node_contents !== undefined) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							renderer.append(textarea_contents);
 | 
					 | 
					 | 
					 | 
							renderer.append(node_contents);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						} else {
 | 
					 | 
					 | 
					 | 
						} else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							renderer.render(node.children, options);
 | 
					 | 
					 | 
					 | 
							renderer.render(node.children, options);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |