Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5118

Multiline string literals are highlighted incorrectly when they contain blank lines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 12.2
    • 12.3
    • cnd - Editor
    • Product Version: Apache NetBeans IDE 12.2
      Java: 15.0.1; OpenJDK 64-Bit Server VM 15.0.1+9
      Runtime: OpenJDK Runtime Environment 15.0.1+9
      System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)

    Description

      According to the spec, (https://openjdk.java.net/jeps/378) blank lines are excluded from "determining lines" when calculating indentation to strip.

      "Blank lines – lines that are empty or are composed wholly of white space – have no visible influence on the indentation."

      NetBeans highlighting does not do this and highlights extra leading spaces as if they are included in the string when there are blank lines that are completely empty or contain less spaces than the correct indent amount.

      Attachments

        1. bad_highlight.png
          17 kB
          Scott Palmer
        2. correct_indent.png
          17 kB
          Scott Palmer

        Issue Links

          Activity

            People

              Unassigned Unassigned
              swpalmer Scott Palmer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m