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

Support quotes for string values and escaping of quotes #19

Closed
orchestr7 opened this issue Apr 30, 2021 · 1 comment · Fixed by #43
Closed

Support quotes for string values and escaping of quotes #19

orchestr7 opened this issue Apr 30, 2021 · 1 comment · Fixed by #43

Comments

@orchestr7
Copy link
Owner

Now we ignore quotes in parsing

@orchestr7
Copy link
Owner Author

orchestr7 commented Jun 3, 2021

Any Unicode character may be used except those that must be escaped: quotation mark, backslash, and the control characters other than tab (U+0000 to U+0008, U+000A to U+001F, U+007F).

str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
For convenience, some popular characters have a compact escape sequence.

\b - backspace (U+0008)
\t - tab (U+0009)
\n - linefeed (U+000A)
\f - form feed (U+000C)
\r - carriage return (U+000D)
" - quote (U+0022)
\ - backslash (U+005C)
\uXXXX - unicode (U+XXXX)
\UXXXXXXXX - unicode (U+XXXXXXXX)
Any Unicode character may be escaped with the \uXXXX or \UXXXXXXXX forms. The escape codes must be valid Unicode scalar values.

All other escape sequences not listed above are reserved; if they are used, TOML should produce an error.

Sometimes you need to express passages of text (e.g. translation files) or would like to break up a very long string into multiple lines. TOML makes this easy.

@orchestr7 orchestr7 linked a pull request Jun 8, 2021 that will close this issue
orchestr7 added a commit that referenced this issue Jun 8, 2021
Adding logic for proper processing of quotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant