mirror of
https://gitlab.com/scemama/irpf90.git
synced 2025-01-02 17:45:41 +01:00
Fix indent if line starts with &
This commit is contained in:
parent
ab88cc01a6
commit
c938931e5e
@ -119,10 +119,12 @@ class indent(object):
|
|||||||
return l.strip().ljust(n) + ' :: '+ r.strip()
|
return l.strip().ljust(n) + ' :: '+ r.strip()
|
||||||
|
|
||||||
def format_continuation(self,string,n):
|
def format_continuation(self,string,n):
|
||||||
buffer = string.split('&')
|
buffer = string.split('&', 1)
|
||||||
if len(buffer) == 1:
|
if len(buffer) == 1:
|
||||||
l = buffer[0]
|
l = buffer[0]
|
||||||
return l
|
return l
|
||||||
|
elif buffer[0].strip() == "":
|
||||||
|
return self.format_continuation(buffer[1], n)
|
||||||
else:
|
else:
|
||||||
l, r = buffer
|
l, r = buffer
|
||||||
return l.strip().ljust(69-len(n)) + '&'+ r.strip()
|
return l.strip().ljust(69-len(n)) + '&'+ r.strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user