loopier / animatron

Animatron for Godot 4.x <
15 stars 1 forks source link

Section descriptions in `DocGenerator` not rendered properly #48

Open loopier opened 1 month ago

loopier commented 1 month ago

The current RegEx compilation string ((#\\s*(.*)\\n)+(\\/def\\s.*\\n)*) parses blocks preceding lines begining with /def, completely ignoring empty lines.

This makes it impossible to create description intros after section titles.

# == section name
#
# bla bla bla

# a docstring comment
/def /whatever

gets rendered as

== section name

=== /whatever
bla bla bla
a docstring comment

it should be

== section name

bla bla bla

=== /watever
a docstring comment

I've tried ((#\\s*(.*)\\n)+(\\/def\\s.*\\n|^$)*) and ((#\\s*(.*)\\n)+(\\/def|^$\\s.*\\n)*) but makes no difference.