alexacallmebaka / kobayashi

a draconic static site builder. 🐉
https://jameshurd.net/projects/kobayashi/manual
3 stars 0 forks source link

Parser error for element grouping syntax #2

Open ephing opened 3 months ago

ephing commented 3 months ago

The current grouping syntax works as follows:

{my_group}

hello

{my_group}

However, if you do this:

{my_group}

hello
{my_group}

you get kobayashi: Prelude.head: empty list.

alexacallmebaka commented 3 months ago

Hi Ethan! Thanks for bringing this to my attention. This is actually not a bug in the parser. Recall that each block element is ended by two subsequent newlines, but in your above example you do not end your paragraph this way. Because of this, the ending {my_group} is seen by the parser as a part of the paragraph that hello belongs to.

I do realize that the error message is pretty bad and super unhelpful, so I'll keep this issue open until I update it to something for descriptive. 😁

Apologies for the confusion!