File tree Expand file tree Collapse file tree 2 files changed +15
-23
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +15
-23
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ qx.Class.define("osparc.conversation.MessageUI", {
115115 this . getChildControl ( "main-layout" ) . addAt ( control , 1 ) ;
116116 break ;
117117 case "message-content" :
118- control = new osparc . ui . markdown . Markdown2 ( ) ;
118+ control = new osparc . ui . markdown . MarkdownChat ( ) ;
119119 this . getChildControl ( "message-bubble" ) . add ( control ) ;
120120 break ;
121121 case "menu-button" : {
Original file line number Diff line number Diff line change 1313
1414/* global marked */
1515
16- qx . Class . define ( "osparc.ui.markdown.Markdown2 " , {
16+ qx . Class . define ( "osparc.ui.markdown.MarkdownChat " , {
1717 extend : qx . ui . embed . Html ,
1818
1919 /**
@@ -111,29 +111,21 @@ qx.Class.define("osparc.ui.markdown.Markdown2", {
111111 const safeHtml = osparc . wrapper . DOMPurify . getInstance ( ) . sanitize ( html ) ;
112112
113113 // flow-root prevents margin collapsing; inline style avoids extra stylesheet juggling
114- let mdRoot ;
115114 const max = 220 ;
116- if ( max ) {
117- mdRoot = `
118- <div class="${ this . self ( ) . MD_ROOT } " style="display:flow-root;">
119- <div class="${ this . self ( ) . MD_MEASURE } "
120- style="
121- display:inline-block;
122- width:max-content;
123- max-width:${ max } px;
124- white-space:normal;
125- overflow-wrap:anywhere; /* break long tokens */
126- ">
127- ${ safeHtml }
128- </div>
129- </div>
130- ` ;
131- } else {
132- mdRoot = `
133- <div class="${ this . self ( ) . MD_ROOT } " style="display:flow-root;">
115+ const mdRoot = `
116+ <div class="${ this . self ( ) . MD_ROOT } " style="display:flow-root;">
117+ <div class="${ this . self ( ) . MD_MEASURE } "
118+ style="
119+ display:inline-block;
120+ width:max-content;
121+ max-width:${ max } px;
122+ white-space:normal;
123+ overflow-wrap:anywhere; /* break long tokens */
124+ ">
134125 ${ safeHtml }
135- </div>` ;
136- }
126+ </div>
127+ </div>
128+ ` ;
137129 this . setHtml ( mdRoot ) ;
138130
139131 // resize once DOM is updated/painted
You can’t perform that action at this time.
0 commit comments