Skip to content

Commit

Permalink
Fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem3213212 committed Oct 25, 2018
1 parent 3926160 commit de76060
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def get_headers(filename, lines):
elif lines[x][y:].startswith('<style'):
status='></style>'
else:
status,nowword,currtag,coords='<','','',x
status,nowword,coords='<','',x
if y+1!=len(lines[x])and lines[x][y+1]in SPACES:
currtag=' '
else:
currtag=''
zz=[]
stack=[0]
z.reverse()
Expand All @@ -77,6 +81,9 @@ def get_headers(filename, lines):
if i[0][0]=='/':
stack.append(i[0][1:])
else:
print(i)
if i[0][0] ==' ':
continue
temp=i[0].split(maxsplit=1)[0]
if stack[-1]==temp:
stack.pop()
Expand All @@ -94,4 +101,3 @@ def get_headers(filename, lines):
ss=open(os.path.join("tests",file),encoding='utf-8').read().split('\n')
for i in get_headers('',ss):
print(i)
break

0 comments on commit de76060

Please sign in to comment.