lib/pagy/extras/trim.rb in pagy-5.9.1 vs lib/pagy/extras/trim.rb in pagy-5.9.2

- old
+ new

@@ -20,10 +20,10 @@ end end # Remove the the :page_param param from the first page link def pagy_trim(pagy, link) - link.sub!(/[?&]#{pagy.vars[:page_param]}=1\b(?!&)|\b#{pagy.vars[:page_param]}=1&/, '') + link.sub!(/(\?|&)#{pagy.vars[:page_param]}=1\b(?!&)|\b#{pagy.vars[:page_param]}=1&/, '') end end Frontend.prepend TrimExtra end