Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Escape characters? #23

Open
csharpfritz opened this issue Sep 6, 2020 · 3 comments
Open

Discussion: Escape characters? #23

csharpfritz opened this issue Sep 6, 2020 · 3 comments
Labels
question Further information is requested

Comments

@csharpfritz
Copy link
Owner

How do we escape special characters like \t \n?

@csharpfritz csharpfritz added the question Further information is requested label Sep 6, 2020
@heidarj
Copy link

heidarj commented Sep 6, 2020

Could be done with backticks, like how powershell does escape characters: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7

@Stelzi79
Copy link
Contributor

Stelzi79 commented Sep 8, 2020

The issue I have with the backtick is that on a non English keyboard layouts it is a bit cumbersome to type because for example French (Roman languages in general) and all Slavic languages use such characters like à á è and the backtick is typed with another character to form these type of characters.

To get a single backtick I have to type < Shift > + < Key with Backtick as a "capitalization" >, < spacebar > on my German QWERTZ Keyboard.

@Stelzi79
Copy link
Contributor

I had some thoughts about that.

I would argue to not allow any escape characters in a key.

How about if we allow only TamlValues to have escape character with a special notation of that value.

I would suggest that when a TamlValue includes special characters we start it with something like \t@ or \t" and everything till there is something like @\n or "\n.

This would look like that in a document:

something
	myCrazyThing	@	line1
		"line2"
		line3@
key2	value2

or

something
	myCrazyThing	"	line1
		line2
		line3"
key2	value2

With this syntax the only thing not allowed to be in such a value would be the end syntax like @\n or "\n. The "\n for ending that could be a possible thing that could be reasonable thing in such a value as in my first example.

If we adopt such an approach to escaping special things would be a very simple approach to that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants