Skip to content

Error "Directive still unclosed" if the end macro have no trailiing '\n' #58

@14NGiestas

Description

@14NGiestas

When the ending macro is at the end of a file, but have no trailing '\n' fypp halts into a FyppFatalError

Steps to reproduce:

~$ cat > macro.fypp
#:mute [ENTER]
#:endmute [CTRL + D] [CTRL + D]
~$ fypp macro.fypp
macro.fypp:1: error: mute directive still unclosed when reaching end of file [FyppFatalError]

The workaround is obviously:

echo "" >> macro.fypp
fypp macro.fypp
[ No error reported ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions