def m
`"return"`
end
a = if true
`true`
else
`false`
end
return true
and return false
def m
`#{"return"}`
end
@iliabylich now this multiline patch breaks for example:
def self.find(selector)
`$(#{selector})`
end
from opal-query, which is now considered a multiline, so no return is added, leading to:
return Opal.defs(self, '$find', TMP_find_1 = function $$find(selector) {
var self = this;
$(selector)
}, TMP_find_1.$$arity = 1)
multiline = strs.any? { |str| str.end_with?("\n") }
does seem to do the right thing
js #{ ruby } more js
:str
`$(#{selector})`
:str
s
:str
but multiple :str, was, now with above fix, to look in the :str
for a \n
mulitline js is detected.Promise
implementation in favor of an API closer to what newer browsers offer natively, which is kinda scary.