Fix multiline docstrings #49

Merged
merged 1 commit into from Sep 13, 2013

Projects

None yet

2 participants

@guns
Collaborator
guns commented Sep 13, 2013

(I screwed up multiline docstrings. Sorry! I don't usually write ns docstrings, and the tests didn't cover this case. This patch should correct all of this.)

Commit e66a406 fixed unintentional
unescaping of docstrings, but also broke multiline docstrings:

    (ns example
      "Foo
       Bar
       Baz")

    =>

    (ns example
      "Foo\n   Bar\n   Baz")

This approach manually escapes \ and " inside of docstrings, but leaves
newlines and other characters as is so that the string is reprinted as
intended.

@guns guns Fix multiline docstrings
Commit e66a406 fixed unintentional
unescaping of docstrings, but also broke multiline docstrings:

        (ns example
          "Foo
           Bar
           Baz")

        =>

        (ns example
          "Foo\n   Bar\n   Baz")

This approach manually escapes \ and " inside of docstrings, but leaves
newlines and other characters as is so that the string is reprinted as
intended.
2fdf1b2
@technomancy technomancy merged commit a3cf425 into technomancy:master Sep 13, 2013
@technomancy
Owner

Nice catch; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment