Escapes
Treat the following character as a plain charactere instead of a markup delimiter.
Works with:
✓ Playgrounds
✓ Symbol documentation
Syntax and Examples
Display a special character by preceding it with a backslash (\
).
\special character
Use the backslash to display a special character in the following cases.
The special character is first character of a playground line formatting delimiter.
For example, to display a single-line delimiter inside of a line delimiter, precede the colon (
:
) with a backslash. The colon is the first special character of the single-line delimiter.//: //\: This is how to write a single line of playground markup
The special character is the first character of a playground multiline formatting delimiter.
For example, to display an asterisk (
*
) at the start of a line instead of a bullet point, precede the asterisk with a backslash.//: \* This is not a bullet item
//: * This is a bullet item
The special character is the first character of a Quick Help delimiter.
For example, to display an asterisk (
*
) at the start of a line instead of a bullet point, precede the asterisk with a backslash./**
A simple example of using *display delimiter*
Do not show the first line as a bullet item
\* This is not a bullet item
* This is a bullet item
*/
The character is an inline delimiter that appears at the start or end of a different character.
For example, the following markup code displays an asterisk (
*
) with emphasis. Asterisks are normally used as the delimiter for a range of characters displayed with emphasis.Playground Example
//: Show the *middle asterisk\* with emphasis*
Quick Help Example
/**
Display a special character with formatting
Show the *middle asterisk\* with emphasis*
*/
To override the effects of a newline such as text wrapping or creating paragraphs.
The following markup shows escaping a the effect of a newline in a playground.
/*:
These two lines
wrap
These two lines\
do not
*/
You do not need to use the backslash with special characters inside a code block or backquote delimited code.
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-06-05