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

Remove blank lines left from snippet markup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 18
    • 18
    • tools
    • None

      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!"
      ```

            prappo Pavel Rappo (Inactive)
            prappo Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: