mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
woops, don't crash on empty string
This commit is contained in:
parent
d272f6a04c
commit
bd258bd79a
@ -1143,7 +1143,7 @@ Value = Transformer({
|
||||
return {
|
||||
"string",
|
||||
delim,
|
||||
part
|
||||
part or ""
|
||||
}
|
||||
else
|
||||
return build.chain({
|
||||
|
@ -598,7 +598,7 @@ Value = Transformer {
|
||||
|
||||
convert_part = (part) ->
|
||||
if type(part) == "string" or part == nil
|
||||
{"string", delim, part}
|
||||
{"string", delim, part or ""}
|
||||
else
|
||||
build.chain { base: "tostring", {"call", {part[2]}} }
|
||||
|
||||
|
@ -26,6 +26,7 @@ hola = [===[
|
||||
|
||||
mm = [[well trhere]]
|
||||
|
||||
oo = ""
|
||||
|
||||
x = "\\"
|
||||
x = "a\\b"
|
||||
|
@ -12,6 +12,7 @@ local hi_there = [[ hi there
|
||||
local well = [==[ "helo" ]==]
|
||||
local hola = [===[ eat noots]===]
|
||||
local mm = [[well trhere]]
|
||||
local oo = ""
|
||||
local x = "\\"
|
||||
x = "a\\b"
|
||||
x = "\\\n"
|
||||
|
Loading…
Reference in New Issue
Block a user