spatools/grunt-html-build — pull request #27 by megawac (2014-01-16 18:56:17+00:00)
Title: Allow setting attributes when building elements

When using your builder I had the need to set the `@media` attribute on some compiled elements. It was easy enough to add to your syntax an additional attributes property of the format `[attributes='last item wrapped in square brackets']`.

Add _attributes_ to templates so users can define custom attributes to
set on the processed element

Example from my own code:

```html

```

Creates a element along the lines of

```html

```

Issues:

- The regexp I implemented isn't greedy so you cannot have nested brackets in the attributes. Cant think of a single instance where this will be a problem for the supported html elements.