<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Sure. Let me quote the proposal:</div><div class=""><br class=""></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">"<i class="">We propose that, when the opening delimiter ends its line and the closing delimiter starts its line, tripled string literals should automatically remove whatever indentation is present before the closing delimiter from each line above it, as well as removing the leading newline. </i>"</span><br class=""><br class=""></div><div class=""><font face="Menlo" style="font-size: 12px;" class="">let str = """</font><span style="font-family: Helvetica; font-size: 14px;" class="">····</span><font face="Menlo" style="font-size: 12px;" class="">My favorite things in life don't cost any money.</font><span style="font-family: Helvetica; font-size: 14px;" class="">↵</span></div><div class=""><span style="font-family: Helvetica; font-size: 14px;" class="">····</span><font face="Menlo" style="font-size: 12px;" class="">It's really clear that the most precious resource we all have is time. - Steve Jobs"""</font></div><div class=""><font face="Menlo" style="font-size: 12px;" class=""><br class=""></font></div><div class=""><br class=""></div><div class="">If I understand correctly, in this example, the opening delimiter does not end its line and the closing delimiter does not begin its line. Therefore, the indentation stripping is not enabled and would yield this:</div><div class=""><br class=""></div><div class=""><div class=""><span style="font-family: Helvetica; font-size: 14px;" class="">····</span><font face="Menlo" style="font-size: 12px;" class="">My favorite things in life don't cost any money.</font><span style="font-family: Helvetica; font-size: 14px;" class="">↵</span></div><div class=""><span style="font-family: Helvetica; font-size: 14px;" class="">····</span><font face="Menlo" style="font-size: 12px;" class="">It's really clear that the most precious resource we all have is time. </font><span style="font-family: Menlo; font-size: 12px;" class="">- Steve Jobs</span></div><div class=""><font face="Menlo" style="font-size: 12px;" class=""><br class=""></font></div><div class=""><font face="Menlo" style="font-size: 12px;" class=""><br class=""></font></div><div class=""><font face="Helvetica" class=""><font class="">I </font>personally do not care if indentation stripping is always enabled. But after having seen all kinds of responses I would not be surprised if someone will ask for the ability to turn indentation stripping on/off. :-)</font></div><div class=""><font face="Helvetica" class=""><br class=""></font></div><div class=""><font face="Helvetica" class="">I think the enabling of <b class="">the indentation stripping could be relaxed a little bit and not require the opening delimiter to end its line</b></font><span style="font-family: Helvetica;" class="">. So for example, it would be possible to do this:</span></div><div class=""><font face="Helvetica" class=""><br class=""></font></div><div class=""><br class=""></div><div class=""><div class="" style="font-family: Helvetica;"><font face="Monaco" class="" style="font-size: 12px;">let xml = <font color="#ff1608" class="">"""</font><font color="#1710ff" class=""><?xml version="1.0"?></font></font></div><div class="" style="font-family: Helvetica;"><font face="Monaco" class="" style="font-size: 12px;"> <font color="#1710ff" class=""><catalog></font></font></div><div class="" style="font-family: Helvetica;"><font face="Monaco" class="" style="font-size: 12px;"> <font color="#1710ff" class=""> <book id="bk101" empty=""></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> </font><font class=""> <author></font><font class=""><font color="#ff1608" class="">\(</font><font color="#079b16" class="">author</font><font color="#ff1608" class="">)</font></author></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> <title>XML Developer's Guide</title></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> <genre>Computer</genre></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> <price>44.95</price></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> <publish_date>2000-10-01</publish_date></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> <descr>An in-depth look at creating applications with XML.</descr></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> </book></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff" style="font-size: 12px;"> <font class=""> </font><font class=""></catalog></font></font></div><div class="" style="font-family: Monaco;"><font class="" color="#1710ff"><font class=""><span class="" style="color: rgb(255, 22, 8); font-size: 12px;"> """</span></font></font></div></div></div><div class=""><br class=""></div><div class=""><span style="font-family: Helvetica;" class="">Notice that here, the opening delimiter does not end its line <b class="">but</b> the closing delimiter does begin its line. This could produce the following:</span></div><div class=""><span style="font-family: Helvetica;" class=""><br class=""></span></div><div class=""><div class=""><div class=""><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"><?xml version="1.0"?></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"><catalog></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <book id="bk101" empty=""></font></font></div><div class=""><font class="" face="Menlo" style="font-size: 12px;"><font class=""> <author>John Doe</font><font class=""></author></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <title>XML Developer's Guide</title></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <genre>Computer</genre></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <price>44.95</price></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <publish_date>2000-10-01</publish_date></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> <descr>An in-depth look at creating applications with XML.</descr></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"> </book></font></font></div><div class=""><font class=""><font class="" face="Menlo" style="font-size: 12px;"></catalog></font></font></div><div class="" style="font-family: Monaco;"><br class=""></div><div class=""><font class="" color="#1710ff"><font class=""><span class="" style="color: rgb(255, 22, 8); font-size: 12px;"><br class=""></span></font></font></div></div></div></div><div class=""><span style="font-family: Helvetica;" class="">I think Brent did a super awesome job. The proposal is very detailed with a ton of examples. I think it covers just about everything that people have asked for. </span></div><div class=""><span style="font-family: Helvetica;" class=""><br class=""></span></div><div class=""><span style="font-family: Helvetica;" class="">Regards,</span></div><div class=""><span style="font-family: Helvetica;" class="">Ricardo</span></div><div class=""><span style="font-family: Helvetica;" class=""><br class=""></span></div><div class=""><span style="font-family: Helvetica;" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">On Apr 11, 2017, at 1:06 PM, Adrian Zubarev <<a href="mailto:adrian.zubarev@devandartist.com" class="">adrian.zubarev@devandartist.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><style class="">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding:1em;
margin:auto;
background:#fefefe;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
h1 {
color: #000000;
font-size: 28pt;
}
h2 {
border-bottom: 1px solid #CCCCCC;
color: #000000;
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777777;
background-color: inherit;
font-size: 14px;
}
hr {
height: 0.2em;
border: 0;
color: #CCCCCC;
background-color: #CCCCCC;
display: inherit;
}
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}
a, a:visited {
color: #4183C4;
background-color: inherit;
text-decoration: none;
}
#message {
border-radius: 6px;
border: 1px solid #ccc;
display:block;
width:100%;
height:60px;
margin:6px 0px;
}
button, #ws {
font-size: 12 pt;
padding: 4px 6px;
border-radius: 5px;
border: 1px solid #bbb;
background-color: #eee;
}
code, pre, #ws, #message {
font-family: Monaco;
font-size: 10pt;
border-radius: 3px;
background-color: #F8F8F8;
color: inherit;
}
code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}
pre {
border: 1px solid #CCCCCC;
overflow: auto;
padding: 4px 8px;
}
pre > code {
border: 0;
margin: 0;
padding: 0;
}
#ws { background-color: #f8f8f8; }
.bloop_markdown table {
border-collapse: collapse;
font-family: Helvetica, arial, freesans, clean, sans-serif;
color: rgb(51, 51, 51);
font-size: 15px; line-height: 25px;
padding: 0; }
.bloop_markdown table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
.bloop_markdown table tr:nth-child(2n) {
background-color: #f8f8f8; }
.bloop_markdown table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
.bloop_markdown table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
.bloop_markdown table tr th :first-child, table tr td :first-child {
margin-top: 0; }
.bloop_markdown table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
.bloop_markdown blockquote{
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
code, pre, #ws, #message {
word-break: normal;
word-wrap: normal;
}
hr {
display: inherit;
}
.bloop_markdown :first-child {
-webkit-margin-before: 0;
}
code, pre, #ws, #message {
font-family: Menlo, Consolas, Liberation Mono, Courier, monospace;
}
.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style><div class="bloop_markdown"><p class="">Can you elaborate a small example please, so I can better understand what you asked for?</p><div class=""><br class="webkit-block-placeholder"></div></div><div class="bloop_original_html"><style class="">body{font-family:Helvetica,Arial;font-size:13px}</style><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;" class=""><br class=""></div> <br class=""> <div id="bloop_sign_1491930306543972864" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px" class="">-- <br class="">Adrian Zubarev<br class="">Sent with Airmail</div></div> <br class=""><p class="airmail_on">Am 11. April 2017 um 18:51:45, Ricardo Parada (<a href="mailto:rparada@mac.com" class="">rparada@mac.com</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span class=""><div dir="auto" class=""><div class=""></div><div class="">
<title class=""></title>
<div class=""><br class="">
<br class="">
Hi Adrian,</div>
<div class=""><br class=""></div>
<div class="">I think having the closing """ on a
line by itself activates the indentation stripping feature. So if
it was to change as you suggest then h<span style="background-color: rgba(255, 255, 255, 0);" class="">ow would you turn off
indentation stripping?</span></div>
<div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><br class=""></span></div>
<div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><br class=""></span></div>
<div class=""><br class="">
On Apr 11, 2017, at 11:08 AM, Adrian Zubarev via swift-evolution
<<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>>
wrote:<br class="">
<br class=""></div>
<blockquote type="cite" class="">
<div class=""><p class="">This would be consistent and less confusing to learn.</p>
<ul class="">
<li class="">Can’t we make the indent algorithm work like this instead?</li>
</ul>
<pre class=""><code class="">let string = """\↵
····<tag>↵
······content text↵
····</tag>""" // Indent starts with the first non space character
// result
<tag>↵
··content text↵
</tag>
</code></pre><p class="">The line where the closing delimiter is trims all space chapters
and the indent for the whole multi-line string is starting at the
point where the first non-space chapters is in that line.</p><p class="">What do you think?</p>
</div>
</blockquote>
</div></div></span></blockquote></div><div class="bloop_markdown"><div class=""><br class="webkit-block-placeholder"></div></div></div></blockquote></div></body></html>