2 次代碼提交 292e53b031 ... ac80f537e2

作者 SHA1 備註 提交日期
  Lionel Dricot ac80f537e2 removing next and previous 2 年之前
  Lionel Dricot 2e9e236dc8 not stripping html from left CR 2 年之前
共有 2 個文件被更改,包括 10 次插入8 次删除
  1. 1 0
      CHANGELOG
  2. 9 8
      offpunk.py

+ 1 - 0
CHANGELOG

@@ -2,6 +2,7 @@
 
 ## 1.4 - Unreleased
 - Making python-readability optional
+- Removing "next" and "previous" which are quite confusing and not obvious
 - Fixing a crash when accessing an empty html page
 
 ## 1.3 - April 2th 2022

+ 9 - 8
offpunk.py

@@ -1080,7 +1080,7 @@ class HtmlRenderer(AbstractRenderer):
             return ansi_img
         def sanitize_string(string):
             #never start with a "\n"
-            string = string.lstrip("\n")
+            #string = string.lstrip("\n")
             string = string.replace("\r","").replace("\n", " ").replace("\t"," ")
             endspace = string.endswith(" ") or string.endswith("\xa0")
             startspace = string.startswith(" ") or string.startswith("\xa0")
@@ -3110,14 +3110,14 @@ Take an integer as argument to go up multiple times."""
         gi = links[self.hist_index]
         self._go_to_gi(gi, update_hist=False)
 
-    def do_next(self, *args):
-        """Go to next item after current in index."""
-        return self.onecmd(str(self.index_index+1))
+    #def do_next(self, *args):
+    #    """Go to next item after current in index."""
+    #    return self.onecmd(str(self.index_index+1))
 
-    def do_previous(self, *args):
-        """Go to previous item before current in index."""
-        self.lookup = self.index
-        return self.onecmd(str(self.index_index-1))
+    #def do_previous(self, *args):
+    #    """Go to previous item before current in index."""
+    #    self.lookup = self.index
+    #    return self.onecmd(str(self.index_index-1))
 
     @needs_gi
     def do_root(self, *args):
@@ -3128,6 +3128,7 @@ Take an integer as argument to go up multiple times."""
         """Add index items as waypoints on a tour, which is basically a FIFO
 queue of gemini items.
 
+`tour` or `t` alone brings you to the next item in your tour.
 Items can be added with `tour 1 2 3 4` or ranges like `tour 1-4`.
 All items in current menu can be added with `tour *`.
 Current item can be added back to the end of the tour with `tour .`.