Open mokolabs opened 3 years ago
just ran into this too. Any interest in a fix from maintainers? I could try submitting a PR if so.
Oops, looks like this is a dup of #7 , which proposes a configuration fix, if a bit hacky.
Rinku.auto_link(text, nil, nil, nil, Rinku::AUTOLINK_SHORT_DOMAINS)
Does seem to work, although annoying to have to put in all those nil
s I didn't otherwise need.
Rinku does not autolink localhost links used by Rails in
:development
mode.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.