Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heex highlight breaks when there is a newline in a quoted string #556

Open
kuon opened this issue Nov 12, 2021 · 2 comments
Open

Heex highlight breaks when there is a newline in a quoted string #556

kuon opened this issue Nov 12, 2021 · 2 comments

Comments

@kuon
Copy link

kuon commented Nov 12, 2021

The following code:

    ~H"""
    <div class={foo("
    ")}>
      </div>
    """

Breaks the syntax highlighting, all subsequent lines are "in" a string.

@feliperenan
Copy link
Contributor

feliperenan commented Dec 7, 2021

Also, it seems that the highlight breaks when the code is written as such:

  • When there is a space at the end of the string.
<div
   class={"class "}>
  • When calling a function with more than one arg1 using String interpolation.
<div
   class={"bar #{my_func(arg1, arg2)}"}>

PS: using one arg1 works normally.

<div
   class={"bar #{my_func(arg1)}"}>

It looks like the space right after the comma of the first argument breaks it.

@kakugawa
Copy link

Temporary workaround: Add a space after the opening bracket.

  • Broken:
<div class={"class "}>
  • (Temporarily) Fixed:
<div class={ "class "}>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants