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

document newline normalization in literal strings #14078

Merged
merged 1 commit into from
Nov 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/manual/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ backslash:
julia> print("I have \$100 in my account.\n")
I have $100 in my account.

Triple-Quoted Strings Literals
Triple-Quoted String Literals
------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RST is picky about header underline lengths

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fix.


When strings are created using triple-quotes (``"""..."""``) they have some
Expand Down Expand Up @@ -482,6 +482,12 @@ defining strings within code that is indented. For example:
In this case the final (empty) line before the closing ``"""`` sets the
indentation level.

Note that line breaks in literal strings, whether single- or triple-quoted,
result in a newline (LF) character ``\n`` in the string, even if your
editor uses a carriage return ``\r`` (CR) or CRLF combination to end lines.
To include a CR in a string, use an explicit escape ``\r``; for example,
you can enter the literal string ``"a CRLF line ending\r\n"``.

Common Operations
-----------------

Expand Down