ソースを参照

Remove trailing whitespaces from neighbors plugin

Jorge Maldonado Ventura 7 年 前
コミット
d04adb3481
共有2 個のファイルを変更した11 個の追加11 個の削除を含む
  1. 8 8
      neighbors/Readme.rst
  2. 3 3
      neighbors/neighbors.py

+ 8 - 8
neighbors/Readme.rst

@@ -1,7 +1,7 @@
 Neighbor Articles Plugin for Pelican
 ====================================
 
-This plugin adds ``next_article`` (newer) and ``prev_article`` (older) 
+This plugin adds ``next_article`` (newer) and ``prev_article`` (older)
 variables to the article's context.
 
 Also adds ``next_article_in_category`` and ``prev_article_in_category``.
@@ -27,7 +27,7 @@ Usage
             </a>
         </li>
     {% endif %}
-   </ul>    
+   </ul>
    <ul>
     {% if article.prev_article_in_category %}
         <li>
@@ -43,21 +43,21 @@ Usage
             </a>
         </li>
     {% endif %}
-    </ul> 
+    </ul>
 
 Usage with the Subcategory plugin
 ---------------------------------
 
 If you want to get the neigbors within a subcategory it's a little different.
 Since an article can belong to more than one subcategory, subcategories are
-stored in a list. If you have an article with subcategories like 
+stored in a list. If you have an article with subcategories like
 
 ``Category/Foo/Bar``
 
 it will belong to both subcategory Foo, and Foo/Bar. Subcategory neighbors are
-added to an article as ``next_article_in_subcategory#`` and 
+added to an article as ``next_article_in_subcategory#`` and
 ``prev_article_in_subcategory#`` where ``#`` is the level of subcategory. So using
-the example from above, subcategory1 will be Foo, and subcategory2 Foo/Bar. 
+the example from above, subcategory1 will be Foo, and subcategory2 Foo/Bar.
 Therefor the usage with subcategories is:
 
 .. code-block:: html+jinja
@@ -77,7 +77,7 @@ Therefor the usage with subcategories is:
             </a>
         </li>
     {% endif %}
-   </ul>    
+   </ul>
    <ul>
     {% if article.prev_article_in_subcategory2 %}
         <li>
@@ -93,5 +93,5 @@ Therefor the usage with subcategories is:
             </a>
         </li>
     {% endif %}
-    </ul> 
+    </ul>
 

+ 3 - 3
neighbors/neighbors.py

@@ -3,7 +3,7 @@
 Neighbor Articles Plugin for Pelican
 ====================================
 
-This plugin adds ``next_article`` (newer) and ``prev_article`` (older) 
+This plugin adds ``next_article`` (newer) and ``prev_article`` (older)
 variables to the article's context
 """
 from pelican import signals
@@ -37,10 +37,10 @@ def set_neighbors(articles, next_name, prev_name):
             exec(
             "translation.{} = get_translation(prv, translation.lang)".format(
                 prev_name))
-      
+
 def neighbors(generator):
     set_neighbors(generator.articles, 'next_article', 'prev_article')
-    
+
     for category, articles in generator.categories:
         articles.sort(key=(lambda x: x.date), reverse=(True))
         set_neighbors(