Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8276803

Remove blank lines left from snippet markup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None

      Description

      If a line is introduced solely to contain markup, then that line should be removed from the resulting output. For example, intuitively it looks like the below snippet should translate to a single line: "Hello, world!".

      ```
      // @start
          Hello, World!
      // @end
      ```

      There are some corner cases, which we need to think about. For example, what if such a line introduces something to the output?

      ```
      // @replace regex=".*" replacement="Hello, World!"
      ```

      Perhaps, in this case the line should contain something other than markup to begin with:

      ```
      ; // @replace regex=";" replacement="Hello, World!"
      ```

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prappo Pavel Rappo
              Reporter:
              prappo Pavel Rappo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: