Skip to content
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 from

Conversation

@parisk
Copy link
Contributor

@parisk 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
"endcomment", "empty"];
keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");

function tokenBase (stream, state) {
Copy link
Member

@marijnh marijnh Mar 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Loading

Copy link
Contributor Author

@parisk parisk Mar 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Loading

@marijnh
Copy link
Member

@marijnh 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!

Loading

@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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants