Skip to content

Commit

Permalink
Add information about segment-literal syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehuda Katz authored and Yehuda Katz committed Dec 28, 2011
1 parent c4c657b commit b723169
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pages/expressions.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@
:html
<h1>{{article/title}}</h1>

.bullet
.description
To reference a property that is not a valid identifier, you can
use segment-literal notation:
:html
{{#each articles.[10].comments}}
<h1>{{subject}}</h1>
<div>
{{body}}
</div>
{{/each}}
.notes
You may not include a closing <code>]</code> in a path-literal,
but all other characters are fair game.

%h2#helpers
Helpers

Expand Down

0 comments on commit b723169

Please sign in to comment.