sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
803 stars 39 forks source link

Mustache highlight fails with https://packagecontrol.io/packages/Mustache #6446

Open nfxpnk opened 1 month ago

nfxpnk commented 1 month ago

Description of the bug

Mustache highlight fails with https://packagecontrol.io/packages/Mustache

Steps to reproduce

  1. Install package https://packagecontrol.io/packages/Mustache
  2. Open *.mustache file with html with virables syntax {{ var }}

Expected behavior

Syntax hightlight is working as expected

Actual behavior

Syntax hightlight is wrong

Sublime Text build number

4180

Operating system & version

Windows 10 latest

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

BenjaminSchaaf commented 1 month ago

Looks like that syntax doesn't work with ST4: https://github.com/cedeber/sublime-mustache/issues/1

deathaxe commented 1 month ago

You could try https://github.com/daaain/Handlebars.

Handlebars uses mustage tags for inlining.

There's also a slightly better https://github.com/seanCodes/handlebars-sublime-syntax, which is not registered at packagecontrol, currently.

nfxpnk commented 1 month ago

@BenjaminSchaaf - It works with previous build v4 @deathaxe Thanks, i'll try it

BenjaminSchaaf commented 1 month ago

I've confirmed this is a bug on our end.

claudiokc commented 1 month ago

Same here! the bug is live on my side

deathaxe commented 1 month ago

Despite the core bug, Mustache package will cause issues (hitting context sanity limit) in future releases - I guess due to JavaScript embedding HTML to support tagged templates.

Thus I've rewritten the syntax package based on Jinja2 to replace currently used push...with_prototype construct.

https://github.com/cedeber/sublime-mustache/pull/2