Fix spoiler issue.
This commit is contained in:
parent
202d7617e3
commit
7b842c01be
@ -45,9 +45,10 @@ Linkify =
|
|||||||
startNode = node
|
startNode = node
|
||||||
while start.length < link.length
|
while start.length < link.length
|
||||||
start += data = (node = walker.nextNode())?.data
|
start += data = (node = walker.nextNode())?.data
|
||||||
{parentNode} = node
|
if Conf['Clean Links']
|
||||||
if parentNode.nodeName is 'S' and Conf['Clean Links']
|
{parentNode} = node
|
||||||
$.replace parentNode, node
|
if parentNode.nodeName is 'S' and parentNode.textContent.length < link.length
|
||||||
|
$.replace parentNode, node
|
||||||
continue unless start[...link.length] is link
|
continue unless start[...link.length] is link
|
||||||
endIndex = link[start.length - data.length...].length
|
endIndex = link[start.length - data.length...].length
|
||||||
walker.currentNode = Linkify.sourround anchor, link, index, endIndex, startNode, node
|
walker.currentNode = Linkify.sourround anchor, link, index, endIndex, startNode, node
|
||||||
@ -88,5 +89,4 @@ Linkify =
|
|||||||
range.surroundContents anchor
|
range.surroundContents anchor
|
||||||
if !Conf['Clean Links'] and parentClone and anchor.firstChild
|
if !Conf['Clean Links'] and parentClone and anchor.firstChild
|
||||||
$.replace anchor.firstChild, parentClone
|
$.replace anchor.firstChild, parentClone
|
||||||
catch
|
|
||||||
endNode
|
endNode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user