From 36aab0f4b2a05a1ae4c8603e57b4c3c684fe8ea8 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Sat, 3 Mar 2018 15:00:55 -0800 Subject: Complete python escape sequences aware strings Fixes #3169 --- docs/markdown/Syntax.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'docs/markdown/Syntax.md') diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 1005100..01c8c6e 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -90,8 +90,24 @@ single quote do it like this: single quote = 'contains a \' character' ``` -Similarly `\n` gets converted to a newline and `\\` to a single -backslash. +The full list of escape sequences is: + +* `\\` Backslash +* `\'` Single quote +* `\a` Bell +* `\b` Backspace +* `\f` Formfeed +* `\n` Newline +* `\r` Carriage Return +* `\t` Horizontal Tab +* `\v` Vertical Tab +* `\ooo` Character with octal value ooo +* `\xhh` Character with hex value hh +* `\uxxxx` Character with 16-bit hex value xxxx +* `\Uxxxxxxxx` Character with 32-bit hex value xxxxxxxx +* `\N{name}` Character named name in Unicode database + +As in python and C, up to three octal digits are accepted in `\ooo`. #### String concatenation -- cgit v1.1