Skip to content

Comments with no space turn open parens into unmatched comments #121

@whonore

Description

@whonore

Given an ML-like language with commentstring=(*%s*), taking the valid program:

(**)
val x = (
  1)

and selecting it all and commenting with gc gives:

(*(**)*)
(*val  x = (*)
(*  1)*)

The (*) on the second line is then treated as an unmatched open comment.

The cause of this bug is probably the same as in some past issues (#3, #29, #40, etc), but the fix might be simpler here since you'd just need to ensure that there's always a space between the last character in a line and the closing comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions