Skip to content

clojure-in-docstring-p is wrong when string contains backslash (\) #544

Closed
@Frozenlock

Description

@Frozenlock

Expected behavior

(def test-string
  "this
is
my
string")

Highlighted as a normal string.

Actual behavior

(def test-string
  "this\n
  is
  my
  string")

Automatic indentation (unwanted in a string!) AND highlighted as a docstring.

Steps to reproduce the problem

Insert an escape character (\) to see the string switch to a docstring highlighting.

Eval (clojure-in-docstring-p) while the cursor is on the string to see that the result is wrong.

Environment & Version information

clojure-mode version information

clojure-mode (version 5.11.0)

Emacs version

Emacs 26.2

Operating system

Ubuntu 18.04.3 LTS

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