<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -32,7 +32,8 @@ module WillPaginate
       :params         =&gt; nil,
       :renderer       =&gt; 'WillPaginate::LinkRenderer',
       :page_links     =&gt; true,
-      :container      =&gt; true
+      :container      =&gt; true,
+      :semantic       =&gt; false
     }
     mattr_reader :pagination_options
 
@@ -56,6 +57,7 @@ module WillPaginate
     # * &lt;tt&gt;:id&lt;/tt&gt; -- HTML ID for the container (default: nil). Pass +true+ to have the ID
     #   automatically generated from the class name of objects in collection: for example, paginating
     #   ArticleComment models would yield an ID of &quot;article_comments_pagination&quot;.
+    # * &lt;tt&gt;:semantic&lt;/tt&gt; -- pagination links rendered with UL/LI tags
     #
     # Advanced options:
     # * &lt;tt&gt;:param_name&lt;/tt&gt; -- parameter name for page number in URLs (default: &lt;tt&gt;:page&lt;/tt&gt;)
@@ -103,6 +105,13 @@ module WillPaginate
         options[:previous_label] = options.delete(:prev_label)
       end
 
+      # semantic link rendering
+      if options[:semantic]
+        options[:renderer] = &quot;WillPaginate::SemanticLinkRenderer&quot;
+        options[:separator] = nil
+        options[:container] = true
+      end
+
       # get the renderer instance
       renderer = case options[:renderer]
       when String
@@ -234,7 +243,8 @@ module WillPaginate
       links.push    page_link_or_span(@collection.next_page,     'disabled next_page', @options[:next_label])
 
       html = links.join(@options[:separator])
-      @options[:container] ? @template.content_tag(:div, html, html_attributes) : html
+      container_tag = @options[:semantic] ? :ul : :div
+      @options[:container] ? @template.content_tag(container_tag, html, html_attributes) : html
     end
 
     # Returns the subset of +options+ this instance was initialized with that
@@ -401,4 +411,21 @@ module WillPaginate
       end
     end
   end
+
+  class SemanticLinkRenderer &lt; LinkRenderer
+
+    def initialize
+      @gap_marker = '&lt;li class=&quot;gap&quot;&gt;&amp;hellip;&lt;/li&gt;'
+    end
+
+  protected
+    def page_link(page, text, attributes = {})
+      li_attributes = attributes.has_key?(:class) ? {:class =&gt; attributes[:class] } : {}
+      @template.content_tag(:li, @template.link_to(text, url_for(page), attributes), li_attributes)
+    end
+
+    def page_span(page, text, attributes = {})
+      @template.content_tag(:li, text, attributes)
+    end
+  end
 end</diff>
      <filename>lib/will_paginate/view_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,8 +68,9 @@ class WillPaginate::ViewTestCase &lt; Test::Unit::TestCase
       @html_document = HTML::Document.new(@html_result, true, false)
 
       if block_given?
+        elementname = options[:semantic] ? 'ul' : 'div'
         classname = options[:class] || WillPaginate::ViewHelpers.pagination_options[:class]
-        assert_select(&quot;div.#{classname}&quot;, 1, 'no main DIV', &amp;block)
+        assert_select(&quot;#{elementname}.#{classname}&quot;, 1, &quot;no main #{elementname.upcase}&quot;, &amp;block)
       end
     end
 </diff>
      <filename>test/lib/view_test_process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -370,4 +370,26 @@ class ViewTest &lt; WillPaginate::ViewTestCase
     end
   end
 
+  ## semantic pagination ##
+
+  def test_semantic
+    paginate([1].paginate({ :page =&gt; 1, :total_entries =&gt; 13, :per_page =&gt; 4 }), :semantic =&gt; true) do |pagination|
+      assert_select 'li a[href]', 4 do |elements|
+        validate_page_numbers [2,3,4,2], elements
+        assert_select elements.last, ':last-child', &quot;Next &amp;raquo;&quot;
+      end
+      assert_select 'li', 6
+      assert_select 'li.disabled.prev_page', '&amp;laquo; Previous'
+      assert_select 'li.current', '1'
+      assert_select 'li a[rel=next]', '2'
+      assert_select 'li.next_page a.next_page[rel=next]', 'Next &amp;raquo;'
+      assert_equal %Q(&lt;ul class=&quot;pagination&quot;&gt;&lt;li class=&quot;disabled prev_page&quot;&gt;&amp;laquo; Previous&lt;/li&gt;&lt;li class=&quot;current&quot;&gt;1&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/foo/bar?page=2&quot; rel=&quot;next&quot;&gt;2&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/foo/bar?page=3&quot;&gt;3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/foo/bar?page=4&quot;&gt;4&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;next_page&quot;&gt;&lt;a href=&quot;/foo/bar?page=2&quot; class=&quot;next_page&quot; rel=&quot;next&quot;&gt;Next &amp;raquo;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;), @html_result
+    end
+  end
+
+  def test_semantic_gap
+    paginate([1].paginate({ :page =&gt; 2, :total_entries =&gt; 25, :per_page =&gt; 4 }), :inner_window =&gt; 1, :semantic =&gt; true) do |pagination|
+      assert_select 'li.gap', '&amp;hellip;'
+    end
+  end
 end</diff>
      <filename>test/view_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0ee5b657442df7b561487b0521bd6d4ffafe2840</id>
    </parent>
  </parents>
  <author>
    <name>Les Hill</name>
    <login>leshill</login>
    <email>leshill@gmail.com</email>
  </author>
  <url>http://github.com/leshill/will_paginate/commit/6db9356185c9172d35d548000ab91d1bd8cbc7b2</url>
  <id>6db9356185c9172d35d548000ab91d1bd8cbc7b2</id>
  <committed-date>2009-06-26T10:54:42-07:00</committed-date>
  <authored-date>2009-06-25T14:23:49-07:00</authored-date>
  <message>:semantic =&gt; true == ul/li pagination</message>
  <tree>e73712f2b4bcd29c019d77a4f2236f995f7628c1</tree>
  <committer>
    <name>Les Hill</name>
    <login>leshill</login>
    <email>leshill@gmail.com</email>
  </committer>
</commit>
