fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.62k stars 262 forks source link

Unexpected syntax highlighting for multiline attribute alignment #777

Closed CestDiego closed 7 years ago

CestDiego commented 7 years ago

It is possible in marko to do things like this:

<divElement if(notEmpty(sellers) && sellers.length > 1)
            body-only-if(sellers.length <= 3)
            col=3
            count=sellers.length
            paginator="dots"
            title=model.title
            preText=model.statusPreText
            separatorText=model.statusSeparatorText
            postText=[model.preText, model.title, model.postText].join(" ").trim() >
    <h1>Hello World </h1>
</divElement>

But It looks like this:

screen shot 2016-08-16 at 2 04 56 pm

And it just looks wrong, it should have every attribute syntax highlightened. also Another request would be to have the indent function indent according to attribute (even if the first attribute is inline with the openning tag) I would be more than happy to look into this if given some clues for that. But as for syntax highlighting that's a whole new thing that I think you might be a more qualified person to do @fxbois

Thank you for this great mode. Also This is the templating language I'm using http://markojs.com/docs/marko/language-guide/

fxbois commented 7 years ago

@CestDiego I have no clue how to handle this nicely ... Won't be able to work on this