Skip to content

Commit

Permalink
Merge pull request fxbois#846 from konnorbeard/master
Browse files Browse the repository at this point in the history
adding schema tag support
  • Loading branch information
fxbois authored Jan 31, 2017
2 parents b5c722f + 1d52954 commit 2d05692
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ Must be used in conjunction with web-mode-enable-block-face."
("ifequal" . "{% ifequal | %}\n\n{% endifequal %}")
("ifnotequal" . "{% ifnotequal | %}\n\n{% endifnotequal %}")
("js" . "{% javascript | %}\n\n{% endjavascript %}")
("schema" . "{% javascript | %}\n\n{% endschema %}")
("safe" . "{% safe | %}\n\n{% endsafe %}")))
("template-toolkit" . (("if" . "[% IF | %]\n\n[% END %]")))
(nil . (("html5" . "<!doctype html>\n<html>\n<head>\n<title></title>\n<meta charset=\"utf-8\" />\n</head>\n<body>\n|\n</body>\n</html>")
Expand Down Expand Up @@ -1541,6 +1542,7 @@ shouldn't be moved back.)")
;; #805
"graph" "endgraph"
"javascript" "endjavascript"
"schema" "endschema"
"stylesheet" "endstylesheet"

)))
Expand Down Expand Up @@ -3012,6 +3014,9 @@ another auto-completion with different ac-sources (e.g. ac-php)")
((and (string= web-mode-engine "django")
(looking-at-p "{% javascript %}"))
(setq tagopen "{% javascript %}"))
((and (string= web-mode-engine "django")
(looking-at-p "{% schema %}"))
(setq tagopen "{% schema %}"))
((and (string= web-mode-engine "django")
(looking-at-p "{% stylesheet %}"))
(setq tagopen "{% stylesheet %}"))
Expand All @@ -3023,6 +3028,7 @@ another auto-completion with different ac-sources (e.g. ac-php)")
"<%block filter=\"collect_js\">"
"<%block filter=\"collect_css\">"
"{% javascript %}"
"{% schema %}"
"{% stylesheet %}"))
(setq part-beg close)
(setq tagclose
Expand All @@ -3032,6 +3038,7 @@ another auto-completion with different ac-sources (e.g. ac-php)")
((string= tagopen "<c:js") "</c:js")
((string= tagopen "<c:css") "</c:css")
((string= tagopen "{% javascript %}") "{% endjavascript %}")
((string= tagopen "{% schema %}") "{% endschema %}")
((string= tagopen "{% stylesheet %}") "{% endstylesheet %}")
((string= tagopen "<%= javascript_tag do %>") "<% end %>")
((member tagopen '("<%block filter=\"collect_js\">"
Expand Down

0 comments on commit 2d05692

Please sign in to comment.