Remove <wbr>s in links, use CSS to break.
This commit is contained in:
parent
715724df29
commit
e6198d4014
@ -1056,8 +1056,10 @@ a.remove {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* colored uid */
|
/* Other */
|
||||||
|
.linkified {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
.posteruid.painted {
|
.posteruid.painted {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
|
|||||||
@ -65,6 +65,7 @@ Linkify =
|
|||||||
else
|
else
|
||||||
walker.previousNode()
|
walker.previousNode()
|
||||||
range.detach()
|
range.detach()
|
||||||
|
@nodes.comment.normalize()
|
||||||
|
|
||||||
find: (link, walker) ->
|
find: (link, walker) ->
|
||||||
# Walk through the nodes until we find the entire link.
|
# Walk through the nodes until we find the entire link.
|
||||||
@ -134,6 +135,8 @@ Linkify =
|
|||||||
|
|
||||||
cleanLink: (anchor, link) ->
|
cleanLink: (anchor, link) ->
|
||||||
{length} = link
|
{length} = link
|
||||||
|
for node in $$ 'wbr', anchor
|
||||||
|
$.rm node
|
||||||
for node in $$ 's, .prettyprint', anchor
|
for node in $$ 's, .prettyprint', anchor
|
||||||
$.replace node, [node.childNodes...] if length > node.textContent.length
|
$.replace node, [node.childNodes...] if length > node.textContent.length
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user