eirproject / eir

Erlang ecosystem common IR
Apache License 2.0
252 stars 8 forks source link

Weird output in interpreter, line breaking in erlang #23

Open lawik opened 4 years ago

lawik commented 4 years ago

As describe in https://github.com/lumen/lumen/issues/393

Based on the Lumen interpreter-in-browser example.

Given this:

    'Elixir.Lumen.Web.Document':create_text_node(_document@1,
                             <<"This new text was created through Elixir in your browser. Which we all know is great. And glorious. And strange. And fine. And what is that? Oh my god! I'm writing long text!">>),

I can create the correct text.

Given this, by my formatter:

'Elixir.Lumen.Web.Document':create_text_node(_document@1,
                             <<"This new text was created through Elixir "
                               "in your browser. Which we all know is "
                               "great. And glorious. And strange. And "
                               "fine. And what is that? Oh my god! I'm "
                               "writing long text!">>),

I get a partial text which only includes the last two "lines". This:

fine. And what is that? Oh my god! I'm writing long text!

Am I missing something?

KronicDeth commented 4 years ago

I saw a similar bug when using the demo. I worked around it by just making the text shorter when showing at FOSDEM. I think I told you on Slack, right @hansihe?

hansihe commented 4 years ago

@KronicDeth Yep, you did. On my backlog after finishing this pass rewrite. Nice to have it in issue form as a reminder