@subiz/widget-v4 4.0.82 → 4.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -105,11 +105,10 @@ class TextMessage extends _common.Com {
|
|
|
105
105
|
deltas = _index.default.parseJSON(deltas) || {};
|
|
106
106
|
deltas = deltas.ops || [];
|
|
107
107
|
|
|
108
|
-
let isMarkdown = _index.default.find(deltas, delta => _index.default.get(delta, 'attributes.bold') || _index.default.get(delta, 'attributes.italic') || _index.default.get(delta, 'attributes.underline'));
|
|
108
|
+
let isMarkdown = _index.default.find(deltas, delta => _index.default.get(delta, 'attributes.bold') || _index.default.get(delta, 'attributes.italic') || _index.default.get(delta, 'attributes.underline') || _index.default.get(delta, 'insert.emoji'));
|
|
109
109
|
|
|
110
110
|
if (isMarkdown) {
|
|
111
111
|
var text = deltaToMarkdown(deltas);
|
|
112
|
-
console.log('text', text);
|
|
113
112
|
return this.renderMarkdown(text);
|
|
114
113
|
}
|
|
115
114
|
|
package/package.json
CHANGED
|
@@ -71,11 +71,13 @@ export default class TextMessage extends Com {
|
|
|
71
71
|
let isMarkdown = sb.find(
|
|
72
72
|
deltas,
|
|
73
73
|
(delta) =>
|
|
74
|
-
sb.get(delta, 'attributes.bold') ||
|
|
74
|
+
sb.get(delta, 'attributes.bold') ||
|
|
75
|
+
sb.get(delta, 'attributes.italic') ||
|
|
76
|
+
sb.get(delta, 'attributes.underline') ||
|
|
77
|
+
sb.get(delta, 'insert.emoji'),
|
|
75
78
|
)
|
|
76
79
|
if (isMarkdown) {
|
|
77
80
|
var text = deltaToMarkdown(deltas)
|
|
78
|
-
console.log('text', text)
|
|
79
81
|
return this.renderMarkdown(text)
|
|
80
82
|
}
|
|
81
83
|
return this.renderPlainText()
|