Skip to content

Multi-line string docstrings seem broken on Windows #1502

@CFiggers

Description

@CFiggers

Using this sample file:

# scratch.janet

(def thing
  ``
  Multi 
  line 

  doc 
  string 
  ``
  123)

(defn main [& args]
  (pp (dyn 'thing))
  (doc thing))

On Linux (as expected):

[caleb@UBUNTU-24.04 ~/projects/janet/scratch] janet ./src/scratch.janet
@{:doc "Multi \nline \n\ndoc \nstring " :source-map ("./src/scratch.janet" 1 1) :value 123}


    number
    ./src/scratch.janet on line 1, column 1

    Multi line

    doc string

On Windows (weird):

PS C:\Users\cdfig\projects\janet\scratch> janet .\src\scratch.janet                                                                                         
@{:doc "\r\n  Multi \r\n  line \r\n\r\n  doc \r\n  string \r\n  " :source-map (".\\src\\scratch.janet" 1 1) :value 123}


    number
    .\src\scratch.janet on line 1, column 1

 string 

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