,
- valueFormatted: string
-): string | React.ReactNode {
- if (Array.isArray(value) && arrayContainsObjects(value)) {
- return value.map(v => JSON.stringify(v, null, 2)).join('\n');
- } else if (Array.isArray(value)) {
- return value.join(', ');
- } else if (typeof value === 'object' && value !== null) {
- return JSON.stringify(value, null, 2);
- } else {
- return typeof valueFormatted === 'string' ? convertAngularHtml(valueFormatted) : String(value);
- }
+export function trimAngularSpan(text: string): string {
+ return text.replace(/^/, '').replace(/<\/span>$/, '');
}
diff --git a/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx b/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
index 2059e35b2c42e..1d979f82d39d8 100644
--- a/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
+++ b/src/legacy/core_plugins/kbn_doc_views/public/views/table/table_row.tsx
@@ -85,7 +85,7 @@ export function DocViewTableRow({
)}
-
+
|
{isCollapsible && (
@@ -93,9 +93,15 @@ export function DocViewTableRow({
)}
{displayUnderscoreWarning && }
{displayNoMappingWarning && }
-
- {value}
-
+
|
);