Skip to content

Commit f10a480

Browse files
committed
fixes #569
1 parent 7c5cfbd commit f10a480

File tree

3 files changed

+166
-398
lines changed

3 files changed

+166
-398
lines changed

fastcore/xml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def xt(tag:str, *c, **kw):
5959

6060
# %% ../nbs/11_xml.ipynb 13
6161
def _to_attr(k,v):
62-
if v==True: return str(k)
63-
if v==False: return ''
62+
if isinstance(v,bool):
63+
if v==True : return str(k)
64+
if v==False: return ''
6465
return f'{k}="{escape(str(v), quote=False)}"'
6566

6667
# %% ../nbs/11_xml.ipynb 14

0 commit comments

Comments
 (0)