1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-22 19:27:43 +00:00

Drop leading and trailing newlines in longstrings.

Long, heredoc style strings can now have
a non semantic leading newline character. This makes it
easier to define large columns of text.
This commit is contained in:
Calvin Rose
2019-04-21 13:34:41 -04:00
parent 4ddf90e301
commit 9100794cea
3 changed files with 18 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
:name "numarray"
:source @["numarray.c"])
(import build/numarray :prefix "")
(import build/numarray :as numarray)
(def a (numarray/new 30))
(print (get a 20))

View File

@@ -100,12 +100,12 @@ Janet num_array_get(void *p, Janet key) {
static const JanetReg cfuns[] = {
{
"numarray/new", num_array_new,
"new", num_array_new,
"(numarray/new size)\n\n"
"Create new numarray"
},
{
"numarray/scale", num_array_scale,
"scale", num_array_scale,
"(numarray/scale numarray factor)\n\n"
"scale numarray by factor"
},