10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-14 16:33:32 +01:00

Merge branch 'fix_indent' into 'master'

Fix indent if line starts with &

See merge request scemama/irpf90!23
This commit is contained in:
Anthony Scemama 2022-10-18 09:47:34 +00:00
commit 088c6fdc04

View File

@ -119,10 +119,12 @@ class indent(object):
return l.strip().ljust(n) + ' :: '+ r.strip()
def format_continuation(self,string,n):
buffer = string.split('&')
buffer = string.split('&', 1)
if len(buffer) == 1:
l = buffer[0]
return l
elif buffer[0].strip() == "":
return self.format_continuation(buffer[1], n)
else:
l, r = buffer
return l.strip().ljust(69-len(n)) + '&'+ r.strip()