asok / projectile-rails

Emacs Rails mode based on projectile
258 stars 59 forks source link

Improve handling of filenames with multiple dots in path extraction #169

Open ichiroc opened 9 months ago

ichiroc commented 9 months ago

I would like to express my gratitude for the work you've done on the projectile-rails library, which is a valuable tool for the Rails community.

I'm submitting this pull request to address an issue with the path extraction of filenames containing multiple dots. The current implementation of the projectile-rails-extract-region function does not effectively handle filenames with multiple dots, leading to incorrect file path extraction.

I've updated the function to use a regular expression with replace-regexp-in-string, replacing the s-slice-at method. This change ensures more accurate handling of filenames with multiple periods, improving the function's robustness.

I've been using this change in my actual work environment for some time without any issues, although it hasn't been extensively tested. I believe this update will be beneficial to other users as well.

Thank you for considering this pull request.