inkle / inkle/ink

Impossible to prevent Ink from collapsing whitespace?

Open
#669 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Sorry for double posting this discussion #666 (heh, interesting), but the discussions don't seem to be very active.

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.