How do I prevent Ink from collapsing whitespace? #666
Replies: 1 comment
-
Hey! It will show as something weird for where you are writing, but in the inky preview, you'll see already that you are good for it. Just make sure that the HTML code will be good enough for your final viewer (and make an early test in your final viewer to make sure it's still working fine) For example, this one will work fine in the web export as it's purely HTML, but I'll run more test before using project wide on some other tech I may be less familiar with. I hope my answer helped you out, even if I answered way after you asked. |
Beta Was this translation helpful? Give feedback.
-
I have a fictional terminal-like setup and I want to do ASCII drawings (and other fixed width formatted text) like these:
But when I get the text from the Ink api the whitespaces are collapsed and I get:
Using a special character to stand in for a space and replace that afterwards could work, but is quite cumbersome and error-prone. I can't do a custom tag or other bespoke postprocessing because, by the time I can process the string, the whitespaces are already collapsed.
I guess I'm looking an option or special syntax that would prevent Ink from collapsing whitespace. Does that exist?
Beta Was this translation helpful? Give feedback.
All reactions