Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8042

groovyConsole gets confused with a slashy string with an escaped forward slash

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.7
    • Fix Version/s: 2.4.13
    • Component/s: Groovy Console
    • Labels:
      None

      Description

      If I paste or enter the following into groovyConsole:
      --------------
      def escapeSlash = /The character \/ is a forward slash/
      --------------

      What it displays is a little confusing. It renders in yellow starting at the first forward slash. The intention is that this would show the entire expression, including the terminating forward slash, in yellow.

      What it actually does is terminate the "yellow" at the second forward slash, which is escaped.

      Fortunately, the expression does execute successfully, but the display makes it seem to the user that there is a syntax error with the expression.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                dkarr David M. Karr
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: