Skip to content

Commit

Permalink
Merge pull request #201 from iacore/fix-long-string
Browse files Browse the repository at this point in the history
Update syntax > long string
  • Loading branch information
bakpakin authored Oct 3, 2023
2 parents ede7bb1 + 2d85c59 commit a342fb0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions content/docs/syntax.mdz
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ supported escapes are:
Strings can also contain literal newline characters that will be ignored. This
lets one define a multiline string that does not contain newline characters.

@codeblock[janet]```
# same as "Thisisastring"
"This
is
a
string"
```

### Long-strings

An alternative way of representing strings in Janet is the long-string, or the
Expand All @@ -134,18 +142,15 @@ literal newline characters, unprintable characters, or strings that would
otherwise require many escape sequences.

@codeblock[janet]```
"This is a string."
"This\nis\na\nstring."
"This
is
a
string."
# same as "This\nis\na\nstring."
``
This
is
a
string
``

# same as "This is\na string."
`
This is
a string.
Expand Down

0 comments on commit a342fb0

Please sign in to comment.