<div dir="ltr"><div>Hello,</div><div><br></div><div>Text blocks are a great feature of the Java language. On the JEP page one of the listed goals of text blocks is to:</div><span style="color:rgb(0,0,255)"><i></i></span><div><span style="color:rgb(0,0,255)"><i>


</i></span><li><br><span style="color:rgb(0,0,255)"><i></i></span><span style="color:rgb(0,0,255)"></span></li><li><span style="color:rgb(0,0,255)"><i>Enhance the readability of strings in Java programs that denote code written in non-Java languages.</i></span>
</li></div><div><br></div><div>Currently when attempting to use text blocks for short strings which can fit on one line for a non-Java language (e.g. JSON) we still need to start the string on another line.</div><div><br></div><div>For example:</div><div><br></div><div>```java</div><div>var json = """</div><div>    {  "color": "red",          "value": "#f00"     } """<br></div><div>```<br></div><div><br></div><div>It would be a lot nicer to have the ability to use the triple quote to define strings like this on one line:</div><div><br></div><div>
<div>```java</div><div>var json = """{  "color": "red",           "value": "#f00"     } """<br></div><div>```</div><div><br></div><div>Currently that is not possible and using a normal quote for strings, ", requires us to escape all of the subsequent quotes on the same line - which is a real pain.</div><div><br></div><div>Obviously we can just continue to start on the next line to avoid the issue - but is it possible to consider an extension to text blocks which allow for this use case (short one line strings)?</div><div><br></div><div>Regards,</div><div>Vikram<br></div>

</div></div>