Skip to content

Commit 56f350c

Browse files
committed
Handle backslash in flint reader
1 parent 766c7a0 commit 56f350c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/sage_setup/autogen/flint/reader.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,16 @@ def process_line(self):
176176
line = self.lines[self.i]
177177
if line.startswith('.. function::'):
178178
self.add_declaration()
179-
if line[13] != ' ':
179+
line_rest = line.removeprefix('.. function::')
180+
if not line_rest.startswith(' '):
180181
print('Warning: no space {}'.format(line))
181-
self.signatures.append(line[13:].strip())
182182
self.state = self.FUNCTION_DECLARATION
183183
self.i += 1
184+
signature = line_rest.strip()
185+
while signature.endswith('\\'):
186+
signature = signature.removesuffix('\\').strip() + ' ' + self.lines[self.i].strip()
187+
self.i += 1
188+
self.signatures.append(signature)
184189
elif line.startswith('.. macro::'):
185190
self.add_declaration()
186191
if line[10] != ' ':

0 commit comments

Comments
 (0)