yui/pure-site — pull request #153 by tilomitra (2013-08-21 19:09:23+00:00)
Title: [Fix #152] Add section helpers to all <h2 class="content-subhead"> elements

This pull request fixes #152 by adding a new Handlebars Helper called `anchor`.

## Usage
Using `{{anchor "My title"}}` will return `

My title

`. You can override the element type and pass in a list of classes as well:

`{{anchor "My title" "h3" "myclass}}` will render out `

My title

`. The regex parses out HTML elements and other special characters from the title to make sure the `id` attribute doesn't look too funny.

I went through and replaced all the `

` with this helper.