Skip to content

Autolinking fails with Rails localhost links #93

Description

@mokolabs

Rinku does not autolink localhost links used by Rails in :development mode.

irb(main):010:0> Rinku.auto_link("http://localhost:3000/products")
=> "http://localhost:3000/products"

While this URL might be missing a TLD, it's still weird that Rinku skips it. I actually thought Rinku was broken, but it turns out it was just ignoring my localhost links.

As a result, I believe my autolinking code will work in production -- where the URLs generated by the router will inherit the top-level domain from the production site -- but continue to fail in development and testing.

Ideally, for the sake of consistency, it should work in all three environments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions