浏览代码

Explore: Handle newlines in LogRow Highlighter (#17425)

rrFeng 6 年之前
父节点
当前提交
c31b939e10
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      public/app/features/explore/LogRow.tsx

+ 2 - 0
public/app/features/explore/LogRow.tsx

@@ -284,6 +284,7 @@ export class LogRow extends PureComponent<Props, State> {
                   <span className={styles}>
                     {parsed && (
                       <Highlighter
+                        style={{ whiteSpace: 'pre-wrap' }}
                         autoEscape
                         highlightTag={FieldHighlight(this.onClickHighlight)}
                         textToHighlight={entry}
@@ -293,6 +294,7 @@ export class LogRow extends PureComponent<Props, State> {
                     )}
                     {!parsed && needsHighlighter && (
                       <Highlighter
+                        style={{ whiteSpace: 'pre-wrap' }}
                         textToHighlight={entry}
                         searchWords={highlights}
                         findChunks={findHighlightChunksInText}