Encoding of Nerd Font characters #2381
ehawman-rosenberg
started this conversation in
General
Replies: 1 comment
|
You're right it doesn't work for YAML. Does for JSON, the migration/export handles that. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
@JanDeDobbeleer, you've stated that you wish us to use the
\uencoding for Nerd Font chars when submitting themes.Can you elaborate on this a bit? When editing, I really appreciate being able to see the actual characters I'm working with, without needing to reference the cheat sheet. Also, when converting formats (json to yaml, for example), 99.99% of conversion tools are going to go ahead and encode those characters. Unencoding them is a tedious task.
If the
\uencoding is a strict requirement, may I request that you modify theconfig exportfunction to detect characters in the Private Use Areas and export them in the desired format?I smashed together a little script in Python to accomplish this, but ran into some context problems. Namely, when a string is simple then YAML doesn't require surrounding it in quotes, and linters follow this convention. When running the script on a formatted YAML theme, it can't identify which NF chars are embedded in a quoted string and which are sitting by themselves (meaning I can't just blanket wrap them in quotes)
wsl: becomeswsl: \ue712which results in:I'm not quite sure how
config exportbehaves, but you probably wouldn't have to fight as hard to determine context for these. Just wanted to share an issue I bumped into when attempting this.Hideous Python code purely for reference
All reactions