mikebridge / Liquid.NET

.Net Port of the Liquid template language
MIT License
62 stars 15 forks source link

Indexing a String by property name should return an error in ErrorWhenMissing mode #51

Closed mikebridge closed 8 years ago

mikebridge commented 8 years ago

A LiquidString should generate a rendering error when ErrorWhenMissing() is on, and the property is not a LiquidNumeric value and it isn't a "special" property like .first, .last or .size.

Should work:

{{ mystring.last }}
{{ mystring[0] }}

Should not work:

{{ mystring.foo }}