diff --git a/services/web/app/views/project/editor/chat.jade b/services/web/app/views/project/editor/chat.jade index 538a5b9d37..86842c36de 100644 --- a/services/web/app/views/project/editor/chat.jade +++ b/services/web/app/views/project/editor/chat.jade @@ -45,7 +45,7 @@ aside.chat( mathjax, ng-repeat="content in message.contents track by $index" ) - span(ng-bind-html="content | linky:'_blank'") + span(ng-bind-html="content | linky:'_blank' | wrapLongWords") .new-message textarea( diff --git a/services/web/public/coffee/filters/wrapLongWords.coffee b/services/web/public/coffee/filters/wrapLongWords.coffee index b639de763b..ea97a58fec 100644 --- a/services/web/public/coffee/filters/wrapLongWords.coffee +++ b/services/web/public/coffee/filters/wrapLongWords.coffee @@ -7,7 +7,7 @@ define [ minLength = minLength || DEF_MIN_LENGTH findWordsRegEx = new RegExp "\\w{#{minLength},}", "g" - wrappingTemplate = "<#{wrapperElName} style='word-break: break-all;'>$&" + wrappingTemplate = "<#{wrapperElName} class=\"break-word\">$&" baseStr.replace findWordsRegEx, wrappingTemplate diff --git a/services/web/public/coffee/ide/chat/index.coffee b/services/web/public/coffee/ide/chat/index.coffee index d5a537903b..de9c46d62d 100644 --- a/services/web/public/coffee/ide/chat/index.coffee +++ b/services/web/public/coffee/ide/chat/index.coffee @@ -3,4 +3,5 @@ define [ "ide/chat/controllers/ChatController" "ide/chat/controllers/ChatMessageController" "ide/chat/directives/mathjax" + "filters/wrapLongWords" ], () -> \ No newline at end of file diff --git a/services/web/public/stylesheets/app/editor/chat.less b/services/web/public/stylesheets/app/editor/chat.less index 495ac6dce0..7e1ad95b8d 100644 --- a/services/web/public/stylesheets/app/editor/chat.less +++ b/services/web/public/stylesheets/app/editor/chat.less @@ -129,6 +129,11 @@ } } +.break-word { + word-break: break-all; + color: red; +} + .editor-dark { .chat { .new-message {