ember-crumbly icon indicating copy to clipboard operation
ember-crumbly copied to clipboard

Extra spaces in bread crumb after /

Open bgantzler opened this issue 7 years ago • 0 comments

I noticed when converting my current version of bread crumbs to this addon there was a extra space at the / for each bread crumb. Also noticed in your tests you trim before checking this.

If you would like to remove this extra space, change the breadcrumb.hbs to the following

{{#if route.linkable}}
  {{#link-to route.path class=linkClass}}
    {{~#if hasBlock}}
      {{yield this route}}
    {{else}}
      {{~route.title}}
    {{~/if}}
  {{/link-to}}
{{else}}
  {{~#if hasBlock}}
    {{yield this route}}
  {{else}}
    {{~route.title}}
  {{~/if}}
{{/if}}

You could move the tildes around or place more if I missed a senario

See http://handlebarsjs.com/expressions.html White Space Control (I learned about this recently, don't know how I didn't know. Surprised it isn't used all the time)

bgantzler avatar Mar 06 '18 02:03 bgantzler