mako-tmbundle icon indicating copy to clipboard operation
mako-tmbundle copied to clipboard

Block declaration inside quotes causes remainder of document to highlight incorrectly

Open betaorbust opened this issue 12 years ago • 5 comments

Screen Shot 2013-01-17 at 12 54 16 PM

betaorbust avatar Jan 17 '13 20:01 betaorbust

Hi guys.

I've found the solution. Actually, this problem related to the deftaul HTML tmLanguage file, incuded by mako language file. HTML tries to identify embeddde code and toughts that it's ruby, that's wrong.

I've fixed HTML.tmLanguage file so embedded mako takes priority over ruby. It works! Replace file Data\Packages\HTML\HTML.tmLanguage with this file: https://gist.github.com/dpetukhov/7057576

To authors: I think better strategy here is copy my HTML file inside bundle and point mako lang file to use it instead of default text.html.basic. Name it like text.html.mako and rename current file to source.mako. I can try to preapare fork for fixing this issue.

dpetukhov avatar Oct 19 '13 15:10 dpetukhov

Workaround worked perfectly. Thanks @dpetukhov!

betaorbust avatar Oct 19 '13 21:10 betaorbust

Hi @dpetukhov. Do you have a patched HTML (Mako).tmLanguage file? I tried diffing the old/new HTML.tmLanguage file to a patch and then applying it but obviously the changes are too invasive for a simple patch to work.

ajkavanagh avatar Feb 13 '14 14:02 ajkavanagh

Sure. I can give you the whole package I made. Drop the folder in your packages dir. I'm using win7, sublime text 3 and path for me is: C:\Users\dima\AppData\Roaming\Sublime Text 3\Packages You can open target folder from menu: Preferences -> Browser Packages. So, place the folder better-mako there and choose syntax better-mako-> HTML (Mako) and delete original mako package before this action.

the package on my yandex disk (russian dropbox): http://yadi.sk/d/aXqlTas_HqPZE

dpetukhov avatar Feb 13 '14 15:02 dpetukhov

@dpetukhov Hey, that's awesome! Thanks very much :)

ajkavanagh avatar Feb 13 '14 17:02 ajkavanagh