-
Notifications
You must be signed in to change notification settings - Fork 1.6k
RFC: Dedented String Literals #3830
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
Open
nik-rev
wants to merge
43
commits into
rust-lang:master
Choose a base branch
from
nik-contrib:dedented_strings
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,963
−0
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
ae8a3a2
RFC: Dedented String Literals
nik-rev b98bd7f
fix: remove `#`
nik-rev 5ced05a
fix: add `#`
nik-rev b4590ac
Clarify why indenting closing quote further is not a syntax error
nik-rev ac324bd
Relax rules around escaped whitespace characters
nik-rev 9bae185
Move section on crate-provided macros under the "Use a crate instead"…
nik-rev a589e0d
Explain why a built-in macro would not suffice
nik-rev 50725a6
Add example how the last line of a dedented string could be formatted
nik-rev 14f09de
fix: The arguments to `writeln!`
nik-rev 0c7cb80
fix: use literal escaped `\t`
nik-rev 0e368fc
Line containing the closing quote may include escaped tab `\t` chars
nik-rev 220fac7
fix: minor spelling
nik-rev dfe1430
fix: spelling
nik-rev 18dd08d
fix: spelling
nik-rev 4730cc8
fix: spelling
nik-rev 8012322
fix: add a newline
nik-rev 70faac7
Add another "sacrifice readability of source code" example with `conc…
nik-rev 545c941
style: fix formatting for all code examples
nik-rev 8b9bcc3
Add section explaining how to have a trailing newline
nik-rev 013a68c
Align all opening quotes with closing quotes. Match `rustfmt`
nik-rev 7a9a58b
Change behaviour of escaped literals: `\t`, `\r` and `\n`
nik-rev 64e289e
fix: Use semicolon
nik-rev b4dcfd0
fix: Word
nik-rev c8673ad
Disallow whitespace escapes in the closing line
nik-rev af7fc31
Fix confusing indentation in example
nik-rev 7f9417c
Remove incorrect description of the chosen acronym
nik-rev ae9a668
Remove note about injected language into string
nik-rev b5cdd57
Explain why the letter `d` is the choice, rather than other letters
nik-rev e36f8ed
Clarify why the dedented string always ends with a newline
nik-rev c0bddbd
Clarify what is meant by "Whitespace"
nik-rev 8b4422c
Clarify what is meant by an empty line
nik-rev acda9b2
Add drawback: large string modifier count can be confusing
nik-rev 9de6bcd
Add drawback about `dr"..."` strings
nik-rev 7bbf74b
fix: Spelling
nik-rev c27b2b7
fix: minor
nik-rev d0b4c27
fix: wording
nik-rev 1f68236
Prior art: add `inspect.cleandoc` from Python
nik-rev 995efe8
Disambiguate "whitespace" and "newline", use more technical terms
nik-rev d18a31a
Allow horizontal whitespace characters between the opening quote and …
nik-rev 0a8c747
Disallow mixing spaces and tabs
nik-rev 371910d
fix: indent only with spaces can't give you tabs
nik-rev a3f9a19
fix: replace tabs with spaces
nik-rev 2eb90a1
Allow mixing spaces and tabs*
nik-rev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.