Skip to content

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
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ae8a3a2
RFC: Dedented String Literals
nik-rev Jun 5, 2025
b98bd7f
fix: remove `#`
nik-rev Jun 5, 2025
5ced05a
fix: add `#`
nik-rev Jun 5, 2025
b4590ac
Clarify why indenting closing quote further is not a syntax error
nik-rev Jun 6, 2025
ac324bd
Relax rules around escaped whitespace characters
nik-rev Jun 6, 2025
9bae185
Move section on crate-provided macros under the "Use a crate instead"…
nik-rev Jun 6, 2025
a589e0d
Explain why a built-in macro would not suffice
nik-rev Jun 6, 2025
50725a6
Add example how the last line of a dedented string could be formatted
nik-rev Jun 6, 2025
14f09de
fix: The arguments to `writeln!`
nik-rev Jun 6, 2025
0c7cb80
fix: use literal escaped `\t`
nik-rev Jun 6, 2025
0e368fc
Line containing the closing quote may include escaped tab `\t` chars
nik-rev Jun 6, 2025
220fac7
fix: minor spelling
nik-rev Jun 6, 2025
dfe1430
fix: spelling
nik-rev Jun 6, 2025
18dd08d
fix: spelling
nik-rev Jun 6, 2025
4730cc8
fix: spelling
nik-rev Jun 6, 2025
8012322
fix: add a newline
nik-rev Jun 6, 2025
70faac7
Add another "sacrifice readability of source code" example with `conc…
nik-rev Jun 6, 2025
545c941
style: fix formatting for all code examples
nik-rev Jun 6, 2025
8b9bcc3
Add section explaining how to have a trailing newline
nik-rev Jun 6, 2025
013a68c
Align all opening quotes with closing quotes. Match `rustfmt`
nik-rev Jun 6, 2025
7a9a58b
Change behaviour of escaped literals: `\t`, `\r` and `\n`
nik-rev Jun 6, 2025
64e289e
fix: Use semicolon
nik-rev Jun 6, 2025
b4dcfd0
fix: Word
nik-rev Jun 6, 2025
c8673ad
Disallow whitespace escapes in the closing line
nik-rev Jun 6, 2025
af7fc31
Fix confusing indentation in example
nik-rev Jun 6, 2025
7f9417c
Remove incorrect description of the chosen acronym
nik-rev Jun 6, 2025
ae9a668
Remove note about injected language into string
nik-rev Jun 7, 2025
b5cdd57
Explain why the letter `d` is the choice, rather than other letters
nik-rev Jun 7, 2025
e36f8ed
Clarify why the dedented string always ends with a newline
nik-rev Jun 7, 2025
c0bddbd
Clarify what is meant by "Whitespace"
nik-rev Jun 7, 2025
8b4422c
Clarify what is meant by an empty line
nik-rev Jun 7, 2025
acda9b2
Add drawback: large string modifier count can be confusing
nik-rev Jun 9, 2025
9de6bcd
Add drawback about `dr"..."` strings
nik-rev Jun 9, 2025
7bbf74b
fix: Spelling
nik-rev Jun 9, 2025
c27b2b7
fix: minor
nik-rev Jun 12, 2025
d0b4c27
fix: wording
nik-rev Jun 12, 2025
1f68236
Prior art: add `inspect.cleandoc` from Python
nik-rev Jun 13, 2025
995efe8
Disambiguate "whitespace" and "newline", use more technical terms
nik-rev Jun 13, 2025
d18a31a
Allow horizontal whitespace characters between the opening quote and …
nik-rev Jun 13, 2025
0a8c747
Disallow mixing spaces and tabs
nik-rev Jun 13, 2025
371910d
fix: indent only with spaces can't give you tabs
nik-rev Jun 13, 2025
a3f9a19
fix: replace tabs with spaces
nik-rev Jun 13, 2025
2eb90a1
Allow mixing spaces and tabs*
nik-rev Jun 13, 2025
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
Loading