feat: support whiteSpace: 'pre-wrap' in prepareRichInline - #193
feat: support whiteSpace: 'pre-wrap' in prepareRichInline#193ChuanfengZhang wants to merge 1 commit into
Conversation
This allows rich text items to preserve leading and trailing spaces, mirroring the behavior of white-space: pre-wrap in CSS. Includes tests for the new mode and ensures backward compatibility with the default 'normal' mode.
|
Is it expected that with these changes calls to |
Yes. |
|
Would be really useful to support this without overflowing the set maximum width, as otherwise setting a maximum width loses its purpose. |
|
I'm not sure trailing white space on inline items is handled correctly at the moment even for the default In HTML, In addition, when rendering this Pretext output using HTML, the lack of a space character has a negative impact on accessibility and usability. For example, if you copy the content of https://chenglou.me/pretext/rich-note/ as plain text, you get this:
I'm not sure what the solution is, but it would probably be worth taking this into consideration before making any changes to how white space is handled. |
This allows rich text items to preserve leading and trailing spaces, mirroring the behavior of white-space: pre-wrap in CSS. Includes tests for the new mode and ensures backward compatibility with the default 'normal' mode.