qmd-lab / closeread

https://closeread.dev
MIT License
130 stars 5 forks source link

Lineblock attributes not parsed correctly #35

Open andrewpbray opened 5 months ago

andrewpbray commented 5 months ago

A lineblock specified like the following reads in just fine:

| {#something .cr-poem cr-id="mylimerick" myattr="true"}
| The limerick packs [laughs anatomical]{#cr-laughs}
|   In space that is quite economical.

However this one,

| {cr-id="mylimerick"}
| The limerick packs [laughs anatomical]{#cr-laughs}
|   In space that is quite economical.

Throws an error in the console: TypeError: Cannot read properties of undefined (reading 'classList') that occurs here.

focusedSticky.classList.add("cr-active");

Check the Lua script - may need to add an empty classlist to line blocks.