zhouyifan279 edited a comment on pull request #1391:
URL: https://github.com/apache/incubator-kyuubi/pull/1391#issuecomment-975239776


   @cfmcgrady Thanks for the comments. I added two properties to unify the 
indent of `|` magin:
   ```
   align.stripMargin = true
   assumeStandardLibraryStripMargin = true
   ``` 
   
   But instead of indent 2 spaces, the above configuration let `|` align with 
the opening triple-quote """ in interpolated. 
   ```
   val example1 =
     s"""Examples:
        |  * one
        |  * two
        |  * $three
        |""".stripMargin
   ```
   Because compared to  indenting 2 spaces, this provides a more directly view 
if we want to print strings aligns from the first line.
   
   ## Indent 2 spaces
   Printed strings align, but code lines not align.
   ```
   val example1 =
     s"""|Examples:
       |  * one
       |  * two
       |  * $three
       |""".stripMargin
   ```
   
   Printed strings have an extra blank line.
   ```
   val example1 =
     s"""
       |Examples:
       |  * one
       |  * two
       |  * $three
       |""".stripMargin
   ```
   
   ## Align with quotes
   Printed strings align. Code lines align with `|`.
   ```
   val example1 =
     s"""|Examples:
         |  * one
         |  * two
         |  * $three
         |""".stripMargin
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to