From e6198d4014b5e995fc3789bb8f9f5d608a0ba0ab Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 15 Feb 2014 00:37:39 +0100 Subject: [PATCH] Remove s in links, use CSS to break. --- css/style.css | 6 ++++-- src/Linkification/Linkify.coffee | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index b75150231..475ae1166 100644 --- a/css/style.css +++ b/css/style.css @@ -1056,8 +1056,10 @@ a.remove { margin: 0; } -/* colored uid */ - +/* Other */ +.linkified { + word-break: break-all; +} .posteruid.painted { padding: 0 5px; border-radius: 1em; diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index bad4bedc1..1d9e15c34 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -65,6 +65,7 @@ Linkify = else walker.previousNode() range.detach() + @nodes.comment.normalize() find: (link, walker) -> # Walk through the nodes until we find the entire link. @@ -134,6 +135,8 @@ Linkify = cleanLink: (anchor, link) -> {length} = link + for node in $$ 'wbr', anchor + $.rm node for node in $$ 's, .prettyprint', anchor $.replace node, [node.childNodes...] if length > node.textContent.length return