Browse code

Updated pullquote.rb to use a vernacular similar to the image tag.

B Strand authored on 12/10/2011 at 18:14:07
Showing 1 changed files
... ...
@@ -17,13 +17,14 @@
17 17
 #     </span>
18 18
 #   </p>
19 19
 #
20
-#  Strand's modification adds the ability to call this plugin with {% pullquote align:left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins.
20
+#  Strand's modification adds the ability to call this plugin with {% pullquote left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins.
21
+#  Note: this version of the plugin now creates pullquotes with the class of pullquote-right by default
21 22
 
22 23
 module Jekyll
23 24
 
24 25
   class PullquoteTag < Liquid::Block
25 26
     def initialize(tag_name, markup, tokens)
26
-      markup =~ /align:left/i ? @align = "left" : @align = ""
27
+      markup =~ /left/i ? @align = "left" : @align = "right"
27 28
       super
28 29
     end
29 30
 
... ...
@@ -31,7 +32,7 @@ module Jekyll
31 31
       output = super
32 32
       if output.join =~ /\{"\s*(.+)\s*"\}/
33 33
         @quote = $1
34
-         "<span class='has-pullquote#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" # TODO Determine how to makethis span have a left or right flag.
34
+         "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" # TODO Determine how to makethis span have a left or right flag.
35 35
       else
36 36
         return "Surround your pullquote like this {\" text to be quoted \"}"
37 37
       end