Skip to content

Escaping characters in theme.yaml #403

Answered by Bru-Katsu
VoxLuna asked this question in Q&A
Discussion options

You must be logged in to vote

I'm trying to define a text string inside theme.yaml for a Windows drive letter, as in C:

DISK_USAGE:
    TEXT: C':' 2TB NVMe          
    X: 42
    Y: 419

The colon causes theme-editor and configure.py to crash when it's used as above. Normally you'd escape it; the usual way is to surround it with double-quotes. But doing so will display as:

Maybe because it's not Python code but YAML. I thought about searching for a glyph representing "colon" but that doesn't solve the problem of, how can I compensate for such characters so they are displayed but not interpreted?

Try this:

DISK_USAGE:
    TEXT: 'C: 2TB NVMe'
    X: 42
    Y: 419

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VoxLuna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants