claranet / ansible-gendoc

Auto generate Ansible documentation
Mozilla Public License 2.0
26 stars 7 forks source link

ansible-gendoc crashes (infinite loop) on empty Markdown files #24

Open brnl-cfit opened 1 year ago

brnl-cfit commented 1 year ago

The reason I opened #23 was to try to fix the issue that the read_file() function crashes into an infinite loop when trying to read an empty (or only containing white space) file.

Steps to reproduce:

Expected behavior:

Possible fix: I'm not sure where it crashes exactly. Maybe in function read_file you could check if there is data left after removing the white spaces before returning.