Skip to content

Repack seems to only works on valid delimiters? #1751

Closed
@Kn0rk

Description

@Kn0rk

image

quad repack [W]hiskey

Will replace the curly brackets around the function rather than the single quotes around the (fake) string. In Java single quotes are only used for characters and double quotes are used for strings. As such defining a string with single quotes is incorrect. I am assuming that the delimiter search is based on the parser which does not recognize the single quotes as delimiters.

To reproduce:

Create a java file in the vscode and paste:

public class TestSingleQuoteDelimiter {
    
    public static void main(String[] args) {
        String notAString = 'this will not work';
    }
  
}

The result after the command is:

public class TestSingleQuoteDelimiter {
    
    public static void main(String[] args) "
        String notAString = 'this will not work';
    "
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions