Skip to content

Commit

Permalink
Remove rel from links without href
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jan 23, 2024
1 parent b649704 commit c78aa28
Show file tree
Hide file tree
Showing 6 changed files with 533 additions and 531 deletions.
834 changes: 417 additions & 417 deletions e2e/snapshots.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/pagy/frontend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ def pagy_nav_prev_html(pagy, link)
if (p_prev = pagy.prev)
%(<span class="page prev">#{link.call p_prev, pagy_t('pagy.nav.prev')}</span> )
else
%(<span class="page prev disabled"><a role="link" aria-disabled="true" rel="prev">#{pagy_t 'pagy.nav.prev'}</a></span> )
%(<span class="page prev disabled"><a role="link" aria-disabled="true">#{pagy_t 'pagy.nav.prev'}</a></span> )
end
end

def pagy_nav_next_html(pagy, link)
if (p_next = pagy.next)
%(<span class="page next">#{link.call p_next, pagy_t('pagy.nav.next')}</span>)
else
%(<span class="page next disabled"><a role="link" aria-disabled="true" rel="next">#{pagy_t 'pagy.nav.next'}</a></span>)
%(<span class="page next disabled"><a role="link" aria-disabled="true">#{pagy_t 'pagy.nav.next'}</a></span>)
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions test/pagy/extras/navs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@
end
end
end


Check failure on line 77 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.1 Test

Layout/EmptyLines: Extra blank line detected.

Check failure on line 77 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.2 Test

Layout/EmptyLines: Extra blank line detected.

Check failure on line 77 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.3 Test

Layout/EmptyLines: Extra blank line detected.
-"<nav class=\"pagy-nav-js pagination\" aria-label=\"Pages\" data-pagy=\"WyJuYXYiLHsiYmVmb3JlIjoiPHNwYW4gY2xhc3M9XCJwYWdlIHByZXZcIj48YSBocmVmPVwiL2Zvbz9wYWdlPTQ5XCIgICByZWw9XCJwcmV2XCIgPiZsc2FxdW87Jm5ic3A7UHJldjwvYT48L3NwYW4+ICIsImxpbmsiOiI8c3BhbiBjbGFzcz1cInBhZ2VcIj48YSBocmVmPVwiL2Zvbz9wYWdlPV9fcGFneV9wYWdlX19cIiAgID5fX3BhZ3lfbGFiZWxfXzwvYT48L3NwYW4+ICIsImFjdGl2ZSI6IjxzcGFuIGNsYXNzPVwicGFnZSBhY3RpdmVcIj48YSByb2xlPVwibGlua1wiIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCIgYXJpYS1jdXJyZW50PVwicGFnZVwiPl9fcGFneV9sYWJlbF9fPC9hPjwvc3Bhbj4gIiwiZ2FwIjoiPHNwYW4gY2xhc3M9XCJwYWdlIGdhcFwiPiZoZWxsaXA7PC9zcGFuPiAiLCJhZnRlciI6IjxzcGFuIGNsYXNzPVwicGFnZSBuZXh0IGRpc2FibGVkXCI+PGEgcm9sZT1cImxpbmtcIiBhcmlhLWRpc2FibGVkPVwidHJ1ZVwiIHJlbD1cIm5leHRcIj5OZXh0Jm5ic3A7JnJzYXF1bzs8L2E+PC9zcGFuPiJ9LHsiMCI6WzEsImdhcCIsNDYsNDcsNDgsNDksIjUwIl19LG51bGxd\"></nav>"

Check failure on line 78 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.1 Test

Lint/Void: Operator `-@` used in void context.

Check failure on line 78 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.2 Test

Lint/Void: Operator `-@` used in void context.

Check failure on line 78 in test/pagy/extras/navs_test.rb

View workflow job for this annotation

GitHub Actions / Ruby 3.3 Test

Lint/Void: Operator `-@` used in void context.
+"<nav class=\"pagy-nav-js pagination\" aria-label=\"Pages\" data-pagy=\"WyJuYXYiLHsiYmVmb3JlIjoiPHNwYW4gY2xhc3M9XCJwYWdlIHByZXZcIj48YSBocmVmPVwiL2Zvbz9wYWdlPTQ5XCIgICByZWw9XCJwcmV2XCIgPiZsc2FxdW87Jm5ic3A7UHJldjwvYT48L3NwYW4+ICIsImxpbmsiOiI8c3BhbiBjbGFzcz1cInBhZ2VcIj48YSBocmVmPVwiL2Zvbz9wYWdlPV9fcGFneV9wYWdlX19cIiAgID5fX3BhZ3lfbGFiZWxfXzwvYT48L3NwYW4+ICIsImFjdGl2ZSI6IjxzcGFuIGNsYXNzPVwicGFnZSBhY3RpdmVcIj48YSByb2xlPVwibGlua1wiIGFyaWEtZGlzYWJsZWQ9XCJ0cnVlXCIgYXJpYS1jdXJyZW50PVwicGFnZVwiPl9fcGFneV9sYWJlbF9fPC9hPjwvc3Bhbj4gIiwiZ2FwIjoiPHNwYW4gY2xhc3M9XCJwYWdlIGdhcFwiPiZoZWxsaXA7PC9zcGFuPiAiLCJhZnRlciI6IjxzcGFuIGNsYXNzPVwicGFnZSBuZXh0IGRpc2FibGVkXCI+PGEgcm9sZT1cImxpbmtcIiBhcmlhLWRpc2FibGVkPVwidHJ1ZVwiPk5leHQmbmJzcDsmcnNhcXVvOzwvYT48L3NwYW4+In0seyIwIjpbMSwiZ2FwIiw0Niw0Nyw0OCw0OSwiNTAiXX0sbnVsbF0=\"></nav>"
Loading

0 comments on commit c78aa28

Please sign in to comment.