```coffeescript
require [
  "handlebars"
], (
  Handlebars
) ->
  helpers =
    highlightMatches: (match) ->
      result = match.wrap (match) ->
        "<span class=\"match\">#{match}</span>"

      new Handlebars.SafeString result

    prettyUrl: (url) ->
      url.replace /^((http|https):\/\/)?(www.)?/, ""

  Handlebars.registerHelper(name, helper) for name, helper of helpers
```

Remove trailing slashes and HTML file extension from prettyfied URLs
user
```coffeescript
require [
  "handlebars"
], (
  Handlebars
) ->
  helpers =
    highlightMatches: (match) ->
      result = match.wrap (match) ->
        "<span class=\"match\">#{match}</span>"

      new Handlebars.SafeString result

    prettyUrl: (url) ->
      url.replace(/^((http|https):\/\/)?(www.)?/, "")
         .replace(/\/$/, "")
         .replace(/\.html$/, "")

  Handlebars.registerHelper(name, helper) for name, helper of helpers
```
assistant