File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed 
packages/svelte/src/compiler/phases/1-parse/utils Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ --- 
2+ ' svelte ' patch 
3+ --- 
4+ 
5+ fix: allow characters in the supplementary special-purpose plane
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ const NUL = 0;
7272// to replace them ourselves 
7373// 
7474// Source: http://en.wikipedia.org/wiki/Character_encodings_in_HTML#Illegal_characters 
75+ // Also see: https://en.wikipedia.org/wiki/Plane_(Unicode) 
76+ // Also see: https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream 
7577
7678/** @param  {number } code */ 
7779function  validate_code ( code )  { 
@@ -116,5 +118,10 @@ function validate_code(code) {
116118		return  code ; 
117119	} 
118120
121+ 	// supplementary special-purpose plane 0xe0000 - 0xe07f and 0xe0100 - 0xe01ef 
122+ 	if  ( ( code  >=  917504  &&  code  <=  917631 )  ||  ( code  >=  917760  &&  code  <=  917999 ) )  { 
123+ 		return  code ; 
124+ 	} 
125+ 
119126	return  NUL ; 
120127} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments