Chomp multiple text from url

Hello all

I’m not sure if this is a question about ruby, middleman or the plugin I’m using but here goes:

I’m using the ‘search_engine_sitemap’ plugin and the line in my config currently looks like this:

activate :search_engine_sitemap, process_url: -> (url) { url.chomp('.html') }

In addition to trimming the .html extension from the pages in the sitemap, I would also like to trim the trailing / as it still shows on the root domain but I cannot work out how to do both. I’ve tried defining arrays and all sorts but I feel this may just down to my lack of Ruby knowledge.

Any help much appreciated!

Don’t worry I managed to sort it by chaining an extra .chomp() on the end.