Skip to content

Error when displaying multi-line replacements #3163

@SAugu06

Description

@SAugu06

In the context of my master thesis, I try to come up with new mutators specifically for Angular web applications. One of my mutator transformed this code:
new UntypedFormControl('', { nonNullable: true, validators: [Validators.maxLength(80)] })

into this replacement string:
"new UntypedFormControl('', {\n nonNullable: true\n })"

This replacement, however, leads to this error when clicking on it in the html report:
Uncaught Error: Cannot find corresponding opening tag for </span>

This seems like a bug to me. For some strange reason, if insert two whitespaces at the end of the first line of the replacement string (before the first \n), this error does not occur. The following replacement string thus works:
"new UntypedFormControl('', { \n nonNullable: true\n })"

I just wanted to let you know about this behavior in case this really is a bug.

Additionally, I wanted to briefly mention that the highlighting of the sections which have changed due to the mutation does not work starting with the second line of the replacement code. Only in the first line of the replacement code the changes are correctly highlighted.

Have a nice day,

Kind regards
Sarah

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions