amyjko / bookish

A simple framework for publishing online books.
MIT License
69 stars 14 forks source link

Comma wraps after segments with marginals #337

Open amyjko opened 1 year ago

amyjko commented 1 year ago
image
amyjko commented 1 year ago

This is caused by the block marginal interface that's contained inside the span. When it's visible, it breaks the algorithm that keeps commas next to words because it finds a block between them. The only way to fix this is to change how marginals are structured in HTML, removing them from the tree and separately rendering them elsewhere. That's probably a better design anyway, though it would make it harder to edit them, since it would require some magic jump to the editor somehow (or a click to the marginal).