This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hey, Love the workbench stuff however I think I've got a syntax highlighting problem. Whenever I reference a jquery object for example $('#foo').val() everything after the last quote doesn't highlight correctly. This may be something to do with me using a custom theme? http://studiostyl.es/schemes/son-of-obsidian has anybody else experienced this? Thanks in advance |
|
|
The custom theme shouldn't cause a problem. I'm not sure I can replicate your problem though. I see incorrect colouring of the brackets, but subsequent expressions are highlighted correctly, as are arguments to the jQuery call. (See attached screenshot -- the highlighting is exaggerated for diagnostic purposes, but you should see that the cube function is correctly highlighted.) Is it the same for you, that it's just the brackets that are wrong, or do you see a more serious problem? If so could you provide us with a small .coffee file that exhibits the problem? Also, we have made some improvements to CoffeeScript highlighting in recent builds, so it's worth checking if the latest update fixes the issue. Call up the Extension Manager and check the Updates tab (it sometimes sits on "No updates found" for a while before showing anything, so give it a few moments!). |
|
|
Hey, I took your latest update, this morning and still no luck I'm afraid. Here is an example. I've narrowed it down to use of the # character when using a jquery selector, presumably this is to do with a conflicting problem with the commenting? As you can see if I remove the # all seems fine. Any thoughts?
|
|
|
... and I've just noticed I've removed the problem by setting it back to visual studios default style :S Is there anyway I can correct this, as I dont see any "display items" options? Cheers |
|
|
I have a similiar issue with hlighting when it comes to string compostion that ends up looking something like this
console.log "The #{@adjective} rabbit says '#{line}' "
|
|
|
Hi statictony, Yes, the # was conflicting with the commenting. I've committed a fix for this which will be in the next update. It's still a bit heuristic but a perfect fix would involve quite a bit more work -- hopefully it will be good enough for now! cecilphillip, I'm afraid this is a known issue. We're leaning on the core CoffeeScript compiler for this one and it's a bit tricky getting accurate positioning information about interpolation strings, but I'll take another look and see if I can improve it. |
|
|
Hi cecilphillip, There'll be an update to interpolated string highlighting in the next update. It's still a bit off, I'm afraid -- if you have an expression of the form "prefix #{val} suffix", it will highlight the preceding '#' and trailing '}' as if they were part of the string literal. However I believe the update will improve highlighting within the interpolated expression, and at least you should no longer see 'half and half' highlighting as you are now. We'll keep plugging away to improve this as time becomes available -- please do still let us know if you see problems other than the one described above. |
|
|
Got the latest update, worked a treat!
Thanks |
|