DannyBen / madness

Instant Markdown Server
https://madness.dannyb.co
MIT License
125 stars 17 forks source link

Update breadcrumbs href with a trailing slash #175

Closed DannyBen closed 5 months ago

DannyBen commented 5 months ago

cc #174


This PR adds a trailing slash to all links in the breadcrumbs. In addition, the following internal changes were done:

  1. The breadcrumbs array returns an array of named structs (Breadcrumb) instead of OpenStruct.
  2. The last breadcrumb will have its href set to nil, instead of having the last: true attribute. Rationale:
    • The last element is never a link
    • The last element is the only element that can either be a file or a folder, and all links end with a / - which means the link may be inappropriate anyway.