I have been having trouble with plates on v0.6.12 where plates mappings are sometimes ignored depending on the order they're specified. Here is an example to reproduce:
The following works:
Plates = require('plates');
var html = '<a class="ticket-search-title" href="foo">title</a></td><td>';
data = { 'url': 'http://github.com', 'title': 'Github' };
map = Plates.Map();
map.class('ticket-search-title').use('title');
map.class('ticket-search-title').use('url').as('href');
console.log(Plates.bind(html, data, map));
It outputs: <a class="ticket-search-title" href="http://github.com">Github</a>
The following fails:
Plates = require('plates');
var html = '<a class="ticket-search-title" href="foo">title</a></td><td>';
data = { 'url': 'http://github.com', 'title': 'Github' };
map = Plates.Map();
map.class('ticket-search-title').use('url').as('href');
map.class('ticket-search-title').use('title');
console.log(Plates.bind(html, data, map));
It outputs: <a class="ticket-search-title" href="foo">Github</a>
I have been having trouble with plates on v0.6.12 where plates mappings are sometimes ignored depending on the order they're specified. Here is an example to reproduce:
The following works:
It outputs:
<a class="ticket-search-title" href="http://github.com">Github</a>
The following fails:
It outputs:
<a class="ticket-search-title" href="foo">Github</a>