Conversation
|
Thanks for tackling this! This is a good start, but it doesn't fully mirror the behavior of the layout implementation because the smart quoter state is local to a single HTML element's body. This means, for example, the example below does not work correctly: "Hello *World"*<p>“Hello <strong>World“</strong></p>To fully mirror the layout implementation (which is paragraph local), we'd want to somehow keep the state in inline contexts, but reset it for block-level elements. It's a little tricky because it would need to span over multiple different realizations. Might take some experimentation to figure out how to transport that state. I had started thinking about this a bit recently, but didn't yet get to the experimentation stage. |
|
Sorry for holding the lock for so long. I don't think I will have the time to think of a clean way to do that anymore. |
|
Revived in #6710 |
Fixes #6337.
I'm not sure if iterating over the previous nodes is the best way to get the last character. This is similar to the way it's done for paged export though:
typst/crates/typst-layout/src/inline/collect.rs
Lines 194 to 195 in 0264534