File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed 
pytiled_parser/parsers/tmx Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,10 @@ def parse(raw_properties: etree.Element) -> Properties:
1212    for  raw_property  in  raw_properties .findall ("property" ):
1313        type_  =  raw_property .attrib .get ("type" )
1414
15-         if  "value"  not  in raw_property .attrib :
15+         value_  =  raw_property .attrib .get ("value" , raw_property .text )
16+         if  value_  is  None :
1617            continue 
1718
18-         value_  =  raw_property .attrib ["value" ]
19- 
2019        if  type_  ==  "file" :
2120            value  =  Path (value_ )
2221        elif  type_  ==  "color" :
Original file line number Diff line number Diff line change 129129          <property name="float property" type="float" value="42.1"/> 
130130          <property name="int property" type="int" value="8675309"/> 
131131          <property name="string property" value="pytiled_parser rulez!1!!"/> 
132+           <property name="multiline string property">Hi 
133+ I can write multiple lines in here 
134+ That's pretty great</property> 
132135         </properties> 
133136        </object> 
134137        """ ,
144147                "float property" : 42.1 ,
145148                "int property" : 8675309 ,
146149                "string property" : "pytiled_parser rulez!1!!" ,
150+                 "multiline string property" : "Hi\n I can write multiple lines in here\n That's pretty great" ,
147151            },
148152        ),
149153    ),
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments