From: Wayne Davison Date: Tue, 23 Aug 2022 22:30:16 +0000 (-0700) Subject: Fix split limits. X-Git-Tag: v3.2.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f2f4131674af790c2e98149c1673b5e9ad1d35d;p=thirdparty%2Frsync.git Fix split limits. --- diff --git a/md-convert b/md-convert index 19709c8d..a48689a7 100755 --- a/md-convert +++ b/md-convert @@ -389,7 +389,7 @@ class TransformHtml(HTMLParser): if val.startswith(('https://', 'http://', 'mailto:', 'ftp:')): pass # nothing to check elif '#' in val: - pg, tgt = val.split('#', 2) + pg, tgt = val.split('#', 1) if pg and pg not in VALID_PAGES or '#' in tgt: st.bad_hashtags.add(val) elif tgt in ('', 'opt', 'dopt'): @@ -478,7 +478,7 @@ class TransformHtml(HTMLParser): find = 'href="' + st.a_href + '"' for j in range(len(st.html_out)-1, 0, -1): if find in st.html_out[j]: - pg, tgt = st.a_href.split('#', 2) + pg, tgt = st.a_href.split('#', 1) derived = txt2target(atxt, tgt) if pg == '': if derived in st.latest_targets: