Skip to content

Commit 1f2f413

Browse files
committed
Fix split limits.
1 parent 0a09df2 commit 1f2f413

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

md-convert

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class TransformHtml(HTMLParser):
389389
if val.startswith(('https://', 'http://', 'mailto:', 'ftp:')):
390390
pass # nothing to check
391391
elif '#' in val:
392-
pg, tgt = val.split('#', 2)
392+
pg, tgt = val.split('#', 1)
393393
if pg and pg not in VALID_PAGES or '#' in tgt:
394394
st.bad_hashtags.add(val)
395395
elif tgt in ('', 'opt', 'dopt'):
@@ -478,7 +478,7 @@ class TransformHtml(HTMLParser):
478478
find = 'href="' + st.a_href + '"'
479479
for j in range(len(st.html_out)-1, 0, -1):
480480
if find in st.html_out[j]:
481-
pg, tgt = st.a_href.split('#', 2)
481+
pg, tgt = st.a_href.split('#', 1)
482482
derived = txt2target(atxt, tgt)
483483
if pg == '':
484484
if derived in st.latest_targets:

0 commit comments

Comments
 (0)