Skip to content

Commit

Permalink
stile: Usa startswith per determinare divisioni
Browse files Browse the repository at this point in the history
  • Loading branch information
alterat committed Nov 22, 2017
1 parent 543abb8 commit e7d71d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions normattiva2rst.py
Expand Up @@ -105,19 +105,19 @@ def checkNumber(ln):
isNumber = 0
isIntro = 1
for line in new_ctxt:
if line[0:4]=="Capo":
if line.startswith("Capo"):
isLetter = 0
isNumber = 0
isCapo = 1
capoTitle = line + "."
elif (line[0:4]=="Sezi") | (line[0:4]=="SEZI"):
elif (line.startswith("Sezione ")) | (line.startswith("SEZIONE ")):
isLetter = 0
isNumber = 0
isSezi=1
isCapo = 0
isArt = 0
seziTitle = line + "."
elif line[0:4]=="Art.":
elif line.startswith("Art. "):
isLetter = 0
isNumber = 0
isArt=1
Expand Down

0 comments on commit e7d71d5

Please sign in to comment.