Skip to content

Newline escape for string literals #23

@njordhov

Description

@njordhov

String literals should support a \n escape character for newline.

Currently, line breaks in string literals are typed as actual newline characters, violating the formatting/indent of the code and obfuscating whitespace trailing the line before the newline:

(define-constant newline "
")

(define-read-only (hello-world)
  (let ((text "Hello World!              
Another line"))
    text))

With newline escapes:

(define-constant newline "\n")

(define-read-only (hello-world)
  (let ((text "Hello World!\nAnother line"))
    text))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions