de-jcup / eclipse-jenkins-editor

Jenkins Editor - A eclipse plugin to edit "Jenkinsfile" files
https://marketplace.eclipse.org/content/jenkins-editor
Apache License 2.0
45 stars 5 forks source link

Gstring highlighting #67

Closed pipeti closed 2 years ago

pipeti commented 5 years ago

Hi,

I get inconsistent highlighting, when using a triple-double-quoted limited gstring, e.g.:

def testScript() {
        return sh (
        script:
        """
        #!/bin/bash
        echo "This is a test script!"
        """,
        returnStatus: false,
        returnStdout: true
        ).trim()
    }

The coloring is not exactly consistent, seems the string is terminated by the single-double-quote and then a new one is started by the other one. string_syntax

Any recommendations? Thanks

de-jcup commented 5 years ago

Hi. Seems multi line string is accidently terminated here on syntax highlighting. Is now marked as a bug. Must be fixed inside EGradle Editor, because used internally by Jenkins Editor as library.

sebthom commented 4 years ago

@de-jcup The last commit to this repo is a year ago. Any chance this issue will get resolved eventually or is development stopped?

Grummel7 commented 3 years ago

It's the same with triple single-quotes and can be quite annoying. I stumbled upon it when using script like this: ''' sed 's/something//' file ... '''

Since the editor thought the s/something// was outside the quoted string, it treated the // as a comment and so skipped over the closing quote. As a consequence, the quote detection was broken for the rest of the file.

de-jcup commented 3 years ago

Must be fixed inside EGradle before - see mentioned link. EGradle editor is internally used in Jenkins Editor as base

de-jcup commented 2 years ago

With jenkins editor 1.8.0 at eclipse 2021-12 I got

image

and also image

So it looks fine for myself - so I close this issue. If this is still a problem please comment at this issue and add some explicit example snippets.