New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement mode for Django templating language #2402

Closed
wants to merge 9 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@parisk
Copy link
Contributor

parisk commented Mar 24, 2014

Implements CodeMirror mode(s) for the Django templating language.

Implemented modes:

  • django, text/x-django: Mode for highlighting embedded Django templating language code into HTML
  • django:inner: Mode for highlighting bare Django templating language code

parisk added some commits Mar 24, 2014

"endcomment", "empty"];
keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");

function tokenBase (stream, state) {

This comment has been minimized.

@marijnh

marijnh Mar 24, 2014

Member

Try to make this consume stretches of non-{ chars in a single call, so that not every character becomes its own token.

This comment has been minimized.

@parisk

parisk Mar 24, 2014

Contributor

Cool, could you please check if sourcelair@72e3c92#diff-4b334edf14b1bb6080b9c2b2f1cf600aR22 works for you?

@marijnh

This comment has been minimized.

Copy link
Member

marijnh commented Mar 24, 2014

Looks good now. I reindented the code to match the rest of the project (two spaces per block), and merged it as 0d698fc . Thanks!

@marijnh marijnh closed this Mar 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment