Skip to content

New escape javascript (`) token #1504

@matthewmueller

Description

@matthewmueller

I'm building an asset bundler that can merge both coffeescript and javascript together. It works fine placing coffeescript inside javascript -- compile it and stick it in the js file.

The problem I'm running into is when I try to include javascript into coffeescript. My approach was to bring in the javascript, escape with `, and then compile the coffeescript.

The problem is many libraries use ` in comments -- including backbone. One thought is to use ``` to escape javascript like comment blocks in coffeescript.

Please let me know your thoughts on this.

After some discussion: The whole point of this issue is to point out that the single backtick does not always work the way it's intended. Use cases and outside discussion should be irrelevant here. Currently, the backtick does not work if you try to escape a file like backbone or jquery or even a two line javascript file that has a comment that includes a backtick.

Thanks,
Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions