fix: made lookahead for bodies better

This commit is contained in:
Bram Dingelstad 2021-12-08 16:16:00 +01:00
parent 6700d03d19
commit b62d8793b9
2 changed files with 4 additions and 3 deletions

View file

@ -117,7 +117,7 @@ func get_nodes():
nodes.append(headers)
# Add +2 to the final line to skip the === from that node
line_number = Array(source_lines).find_last(body.split('\n')[-1]) + 2
line_number = Array(source_lines).find('===', line_number) + 1
while line_number < source_lines.size() and source_lines[line_number].empty():
line_number += 1
@ -134,6 +134,7 @@ func assert(statement, message, line_number = -1, column = -1, _absolute_line_nu
func compile():
var parsed_nodes = []
for node in get_nodes():
var lexer = Lexer.new(self, filename, node.title, node.body)
var tokens = lexer.tokenize()

View file

@ -26,8 +26,8 @@ enabled=PoolStringArray( "res://addons/Wol/plugin.cfg" )
[network]
limits/debugger_stdout/max_chars_per_second=8096
limits/debugger_stdout/max_messages_per_frame=200
limits/debugger_stdout/max_chars_per_second=32384
limits/debugger_stdout/max_messages_per_frame=1024
[physics]