From 492e3b3e20a2b9a7b9fd6ec96cd9fa7d3b797b42 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 22 Jun 2020 10:53:04 -0700 Subject: [PATCH] Fix runArtContentsText regex. --- components/RunCard.renderCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/RunCard.renderCell.tsx b/components/RunCard.renderCell.tsx index 0dac1ad..96a095e 100644 --- a/components/RunCard.renderCell.tsx +++ b/components/RunCard.renderCell.tsx @@ -179,7 +179,7 @@ export function renderCell( const line = region?.startLine ?? 1 const col = region?.startColumn ?? 1 const length = (region?.endColumn ?? 1) - col - const [_, pre, hi, post] = new RegExp(`((?:.*\\n){${line - 1}}.{${col - 1}})(.{${length}})((?:.|\\n)*)`).exec(runArtContentsText) + const [_, pre, hi, post] = new RegExp(`((?:.*?\\n){${line - 1}}.{${col - 1}})(.{${length}})((?:.|\\n)*)`, 's').exec(runArtContentsText) const escape = unsafe => unsafe .replace(/&/g, "&")