[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Fri Jan 14 07:46:13 UTC 2022


The branch, master has been updated
       via  f08505e9 Add more link targets to html man pages.
       via  c1e8809a Tweak a caveat.
      from  6130c4fa Display ??:??:?? when a time estimate gets too big.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f08505e92ba385e3af1be9138916269a58c057e7
Author: Wayne Davison <wayne at opencoder.net>
Date:   Thu Jan 13 23:39:40 2022 -0800

    Add more link targets to html man pages.

commit c1e8809a8f9d6dec97dcefd82d548599cbad81bc
Author: Wayne Davison <wayne at opencoder.net>
Date:   Thu Jan 13 23:31:43 2022 -0800

    Tweak a caveat.

-----------------------------------------------------------------------

Summary of changes:
 md-convert | 20 +++++++++++++++-----
 rsync.1.md |  6 +++---
 2 files changed, 18 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/md-convert b/md-convert
index d1266f45..3b66a059 100755
--- a/md-convert
+++ b/md-convert
@@ -332,10 +332,18 @@ class TransformHtml(HTMLParser):
         st.at_first_tag_in_dd = False
 
 
-    def add_anchor(self, txt):
+    def add_target(self, txt):
         st = self.state
-        txt = txt.lower().replace(' ', '-')
-        st.html_out.append('<span id="' + txt + '"></span>')
+        txt = re.sub(r'[%s](.+?)[=%s].*' % (BOLD_FONT[0], NORM_FONT[0]), r'\1', txt.strip())
+        txt = re.sub(r'[%s]' % NBR_DASH[0], '-', txt)
+        txt = re.sub(r'[\1-\7]+', '', txt)
+        txt = re.sub(r'[^-A-Za-z0-9._]', '_', txt)
+        if txt.startswith('-'):
+            txt = 'opt' + txt
+        else:
+            txt = re.sub(r'^([^A-Za-z])', r't\1', txt)
+        if txt:
+            st.html_out.append('<span id="' + txt + '"></span>')
 
 
     def handle_endtag(self, tag):
@@ -350,14 +358,16 @@ class TransformHtml(HTMLParser):
         add_to_txt = None
         if tag == 'h1' or tag == 'h2':
             st.man_out.append(st.p_macro + '.SH "' + manify(txt) + '"\n')
-            self.add_anchor(txt)
+            self.add_target(txt)
         elif tag == 'h3':
             st.man_out.append(st.p_macro + '.SS "' + manify(txt) + '"\n')
-            self.add_anchor(txt)
+            self.add_target(txt)
         elif tag == 'p':
             if st.dt_from == 'p':
                 tag = 'dt'
                 st.man_out.append('.IP "' + manify(txt) + '"\n')
+                if txt.startswith(BOLD_FONT[0]):
+                    self.add_target(txt)
                 st.dt_from = None
             elif txt != '':
                 st.man_out.append(manify(txt) + "\n")
diff --git a/rsync.1.md b/rsync.1.md
index 9b9b6996..74615e56 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -1080,9 +1080,9 @@ your home directory (remove the '=' for that).
     slash) to "/dest/subdir" that would not allow symlinks to any files outside
     of "subdir".
 
-    This option has no additional effect if `--copy-links` was also specified.
-    The safe symlinks are only copied if `--links` was also specified or
-    implied by `--archive` (`-a`).
+    Note that safe symlinks are only copied if `--links` was also specified or
+    implied. The `--copy-unsafe-links` option has no extra effect when combined
+    with `--copy-links`.
 
     See the [SYMBOLIC LINKS](#SYMBOLIC-LINKS) section for multi-option info.
 


-- 
The rsync repository.



More information about the rsync-cvs mailing list