Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Split Handlebars into its own language #11295

Merged
merged 1 commit into from
Jul 30, 2015
Merged

Conversation

sprintr
Copy link
Contributor

@sprintr sprintr commented Jun 20, 2015

Now that we have enabled CodeMirror's simple-mode addon in the core, we should split handlebars mode, which uses simple-mode addon, into its own language.

@marcelgerber
Copy link
Contributor

This will give you a raw Handlebars mode without HTML syntax highlighting.

This is how CodeMirror did it:

      CodeMirror.defineMode("htmlhandlebars", function(config) {
        return CodeMirror.multiplexingMode(
          CodeMirror.getMode(config, "text/html"),
          {open: "{{", close: "}}",
           mode: CodeMirror.getMode(config, "handlebars"),
           parseDelimiters: true});
      });

@sprintr
Copy link
Contributor Author

sprintr commented Jun 23, 2015

@marcelgerber Should be fine now.

@sprintr sprintr force-pushed the cm-handlebars branch 2 times, most recently from 90c318c to 08d2dc3 Compare June 26, 2015 02:51
@marcelgerber
Copy link
Contributor

Looks good to me.

The brackets.js change is a hack, but unfortunately, there's no way 'round this right now.

@marcelgerber marcelgerber added this to the Release 1.5 milestone Jul 1, 2015
@TomMalbran
Copy link
Contributor

Why can't we load the mode in the extension? or do a trick like the one used for rpm: #11314?

@sprintr
Copy link
Contributor Author

sprintr commented Jul 1, 2015

@marcelgerber What do you think about loading mode in the extension itself like in #11314 ?

@marcelgerber
Copy link
Contributor

If that works, it's a whole lot cleaner.

@sprintr
Copy link
Contributor Author

sprintr commented Jul 1, 2015

@marcelgerber Yeah, it works. I'll rebase and push.

@sprintr
Copy link
Contributor Author

sprintr commented Jul 1, 2015

Travis CI build has passed. @marcelgerber Can you have a look at it

@marcelgerber
Copy link
Contributor

This is all good & ready to go from my side.

@ryanstewart Do we want this in 1.4 or should we wait for 1.5?

@abose
Copy link
Contributor

abose commented Jul 30, 2015

Merging.
Thanks @sprintr

abose added a commit that referenced this pull request Jul 30, 2015
Split Handlebars into its own language
@abose abose merged commit 40bfc6d into adobe:master Jul 30, 2015
@sprintr sprintr deleted the cm-handlebars branch July 31, 2015 20:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants