Skip to content

Commit

Permalink
[handlebars mode] add support for triple mustache tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp authored and marijnh committed Aug 1, 2019
1 parent 65fab82 commit a6a9696
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mode/handlebars/handlebars.js
Expand Up @@ -13,10 +13,14 @@

CodeMirror.defineSimpleMode("handlebars-tags", {
start: [
{ regex: /\{\{\{/, push: "handlebars_raw", token: "tag" },
{ regex: /\{\{!--/, push: "dash_comment", token: "comment" },
{ regex: /\{\{!/, push: "comment", token: "comment" },
{ regex: /\{\{/, push: "handlebars", token: "tag" }
],
handlebars_raw: [
{ regex: /\}\}\}/, pop: true, token: "tag" },
],
handlebars: [
{ regex: /\}\}/, pop: true, token: "tag" },

Expand Down
2 changes: 2 additions & 0 deletions mode/handlebars/index.html
Expand Up @@ -41,6 +41,8 @@ <h1>{{t 'article_list'}}</h1>

{{! one line comment }}

{{{propertyContainingRawHtml}}}

{{#each articles}}
{{~title}}
<p>{{excerpt body size=120 ellipsis=true}}</p>
Expand Down

0 comments on commit a6a9696

Please sign in to comment.